/* ScanComply Main Stylesheet */

/* CSS Variables - define colors once, use everywhere */
:root {
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-700: #374151;
    --gray-900: #111827;
}

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
}

/* Skip to content link - visible only when focused */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
}

/* Container for consistent width */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation styling */
.nav {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Main content area */
main {
    min-height: 70vh;
    padding: 40px 0;
}

/* Card component for sections */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 30px 0;
    margin-top: 60px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--gray-700);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: var(--gray-700);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--gray-900);
}

/* Ad space placeholder */
.ad-container {
    text-align: center;
    padding: 20px 0;
    background: white;
}

.ad-placeholder {
    background: #f3f4f6;
    height: 90px;
    max-width: 728px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

/* Footer grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-column ul {
    list-style: none;
    line-height: 2;
}

.footer-column a {
    color: var(--gray-700);
    text-decoration: none;
}

.footer-column a:hover {
    text-decoration: underline;
}

.footer-copyright {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    text-align: center;
    color: var(--gray-700);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* Homepage specific styles */
.hero-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
}

.hero-caption {
    margin-top: 10px;
    opacity: 0.9;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-help {
    color: var(--gray-700);
    margin-top: 8px;
    display: block;
    font-size: 14px;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* Info cards grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.info-card h3 {
    margin-bottom: 10px;
}

.info-card p {
    margin-top: 10px;
}

/* Resource cards */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.resource-card h3 {
    margin-bottom: 10px;
}

.resource-card p {
    margin-bottom: 10px;
}

.resource-card a {
    color: var(--primary);
    text-decoration: none;
}

.resource-card a:hover {
    text-decoration: underline;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-title {
    margin-top: 20px;
    color: #374151;
}

.loading-subtitle {
    color: #6b7280;
    margin-top: 10px;
}

.loading-details {
    color: #9ca3af;
    margin-top: 10px;
    font-size: 14px;
}

.loading-url {
    color: #9ca3af;
    margin-top: 20px;
    font-size: 14px;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-success {
    color: var(--success);
}

.text-primary {
    color: var(--primary);
}

.font-bold {
    font-weight: 600;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Alerts and messages */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: var(--warning);
    border: 1px solid #fde68a;
}

/* Details/Summary (FAQ) */
details {
    margin: 20px 0;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 8px;
}

summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
}

details[open] summary {
    margin-bottom: 15px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: var(--gray-50);
    font-weight: 600;
}

/* Links */
a {
    color: var(--primary);
}

/* Lists */
ul, ol {
    margin-left: 20px;
    line-height: 1.8;
}

/* Headings */
h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Paragraphs */
p {
    line-height: 1.8;
}

/* Code blocks */
pre {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Google Translate Widget Styling */
#google_translate_element {
    display: inline-block;
}

/* Style the Google Translate dropdown */
.goog-te-gadget {
    font-family: inherit !important;
}

.goog-te-gadget-simple {
    background-color: transparent !important;
    border: 1px solid #e5e7eb !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.goog-te-gadget-simple:hover {
    border-color: var(--primary) !important;
}

.goog-te-gadget-icon {
    display: none !important;
}

/* Hide Google Translate banner at top of page */
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Style the language selector text */
.goog-te-menu-value span {
    color: var(--gray-700) !important;
}

.goog-te-menu-value:hover span {
    color: var(--primary) !important;
}

/* Fix Google Translate dropdown overlay issue */
.goog-te-menu-frame {
    z-index: 999 !important; /* Below navigation (1000) */
    max-height: 400px !important; /* Prevent it from being too tall */
}

/* The iframe container that holds the language menu */
.goog-te-menu2 {
    z-index: 999 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* Ensure the banner/overlay respects z-index */
.goog-te-banner-frame {
    z-index: 998 !important; /* Below both nav and menu */
}

/* Additional fix for the skiptranslate elements */
.skiptranslate {
    z-index: 999 !important;
}

/* Make sure the dropdown doesn't go behind other elements */
.skiptranslate > iframe {
    z-index: 999 !important;
    position: relative !important;
}

/* Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Translation disclaimer styling */
.translation-disclaimer {
    background: #fef3c7;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid var(--warning);
}

.translation-disclaimer p {
    margin: 0;
    color: #92400e;
}

/* ========================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   Added for new homepage layout
   ======================================== */

/* Mobile-first responsive adjustments */
@media (max-width: 768px) {
    /* Hero section mobile adjustments */
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Problem section - stack columns on mobile */
    section#the-problem div[style*="grid-template-columns"],
    section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    section#the-problem .card {
        margin-bottom: 20px;
    }
    
    /* Scanner cards - ensure full width on mobile */
    .scanner-card {
        min-width: 100% !important;
        margin-bottom: 20px;
    }
    
    /* Professional solutions cards */
    section .card[style*="linear-gradient"] {
        margin-bottom: 20px;
    }
    
    /* Trust signals - better mobile spacing */
    section div[style*="grid-template-columns"] {
        gap: 20px !important;
    }
    
    /* Final CTA buttons - stack vertically */
    section[style*="linear-gradient"] div[style*="flex"] {
        flex-direction: column !important;
        align-items: center;
    }
    
    section[style*="linear-gradient"] .btn {
        width: 200px;
        margin: 10px 0 !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .scanner-card {
        min-width: calc(50% - 15px) !important;
    }
}

/* Ensure buttons don't get cut off */
.btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Improve touch targets for mobile */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    a {
        padding: 8px;
    }
}

/* Print styles - hide non-essential elements */
@media print {
    .hero-section,
    section[style*="linear-gradient"],
    #google_translate_element {
        display: none !important;
    }
}
