/* Eye Tools - Global Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    /* Prevent layout shift between pages with/without scrollbars */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.5;
    /* Standardize line-height (Tailwind default) to match tools */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    position: relative;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #60a5fa;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.lang-btn:hover,
.lang-dropdown:hover .lang-btn {
    background: #334155;
    color: #e2e8f0;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 140px;
    z-index: 50;
    overflow: hidden;
}

.lang-dropdown.open .lang-menu {
    display: block;
}

.lang-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.lang-item:hover {
    background: #334155;
    color: #fff;
}

.lang-item.active {
    background: #334155;
    font-weight: 500;
    color: #60a5fa;
}

.btn-login {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #2563eb;
}

/* Main Navigation (Desktop) */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Mobile navigation (hidden on desktop) */
.mobile-nav {
    display: none;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.5;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.nav-link:hover {
    background: #334155;
    color: #e2e8f0;
}

.nav-link.active {
    color: #60a5fa;
    background: #334155;
}

/* Tools Dropdown */
.tools-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tools-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 280px;
    z-index: 50;
    overflow: hidden;
}

.tools-dropdown.open .tools-menu {
    display: block;
}

.tools-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.tools-item:hover {
    background: #334155;
    color: #fff;
}

.tools-item .tool-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.tools-item .tool-name {
    flex: 1;
}

.tools-item .badge {
    flex-shrink: 0;
}

/* Hamburger Menu (Mobile) */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 100;
    margin-left: auto;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #94a3b8;
    transition: all 0.3s ease;
}

.hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Premium CTA Section */
.premium-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0 3rem;
}

.premium-cta h2 {
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.premium-cta p {
    color: #c7d2fe;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-premium {
    display: inline-block;
    background: #fff;
    color: #3730a3;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    /* Hide desktop nav and nav-right on mobile */
    .desktop-nav,
    .nav-right {
        display: none !important;
    }

    /* Show mobile nav when open */
    .mobile-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e293b;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #334155;
        gap: 0.5rem;
        z-index: 100;
    }

    .mobile-nav.open {
        display: flex;
    }

    .mobile-nav .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .mobile-nav .tools-dropdown {
        width: 100%;
    }

    .mobile-nav .tools-btn {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-nav .tools-menu {
        position: static;
        margin-top: 0;
        margin-left: 0;
        width: calc(100% + 2rem);
        margin-right: -1rem;
        border: none;
        background: #0f172a;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }

    .mobile-nav .tools-item {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        overflow: visible;
    }

    .mobile-nav .tools-item .tool-icon {
        flex-shrink: 0;
    }

    .mobile-nav .tools-item .tool-name {
        flex: 1;
        min-width: 0;
    }

    .mobile-nav .tools-item .badge {
        flex-shrink: 0;
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    .mobile-divider {
        border: none;
        border-top: 1px solid #334155;
        margin: 0.5rem 0;
    }

    .mobile-nav .lang-dropdown {
        width: 100%;
    }

    .mobile-nav .lang-btn {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-nav .lang-menu {
        position: static;
        margin-top: 0.5rem;
        min-width: 100%;
    }

    .mobile-nav .btn-login {
        width: 100%;
        text-align: center;
    }

    /* Edu sections full width on mobile */
    .edu-section {
        max-width: 100%;
    }
}

/* FAQ Page Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h1 {
    font-size: 2.5rem;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.faq-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.faq-section {
    margin-bottom: 2rem;
}

.faq-section h2 {
    font-size: 1.25rem;
    color: #60a5fa;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #334155;
}

.faq-item {
    background: #1e293b;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 1.25rem;
    text-align: left;
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #334155;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: #60a5fa;
    transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    display: none;
    padding: 0 1.25rem 1rem;
    color: #94a3b8;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.tool-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: #3b82f6;
}

.tool-icon {
    font-size: 2.5rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    color: #f1f5f9;
}

.tool-card p {
    font-size: 0.875rem;
    color: #94a3b8;
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.badge.free {
    background: #065f46;
    color: #34d399;
}

.badge.premium {
    background: #7c3aed;
    color: #c4b5fd;
}

/* Footer */
footer {
    background: #1e293b;
    border-top: 1px solid #334155;
    padding: 1.5rem 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .btn-login {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    main {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Vibrancy & Content Styles */
/* Use Cases Section */
.use-cases-container {
    margin: 2rem 0 2rem 0;
}



.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.use-case-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: #3b82f6;
}

.use-case-card h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.use-case-card p {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

.educational-content {
    margin-top: 4rem;
    display: grid;
    gap: 2rem;
    /* Reduced gap since cards are now stacked but offset */
}

.edu-section {
    background: #1e293b;
    border-left: 4px solid #3b82f6;
    padding: 2rem;
    border-radius: 0 1rem 1rem 0;
    max-width: 70%;
    /* Reduced width */
    margin-right: auto;
    /* Align left */
    text-align: left;
}

.edu-section:nth-child(even) {
    border-left: none;
    border-right: 4px solid #a78bfa;
    border-radius: 1rem 0 0 1rem;
    margin-right: 0;
    margin-left: auto;
    /* Align right */
    text-align: right;
}

.edu-section h2 {
    color: #f8fafc;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.edu-section p {
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ============================================
   ACCESSIBILITY (RGAA 4.1 Compliance)
   ============================================ */

/* Skip to main content link (RGAA 12.7) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Focus visibility for keyboard navigation (RGAA 10.7) */
/* Uses :focus-visible to avoid showing outlines on mouse click */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Specific focus styles for dark backgrounds */
.tool-card:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-color: #60a5fa;
}

.btn-login:focus-visible,
.lang-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.lang-item:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
    background: #334155;
}

/* Reduced motion preference (RGAA 13.8) */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}