/* ========================================
   CSS VARIABLES - Synalogic Brand
   ======================================== */
:root {
    --navy: #0D1B2A;
    --teal: #1B9AAA;
    --light-teal: #6CC3D5;
    --teal-glow: rgba(27, 154, 170, 0.12);
    --dark-navy: #051923;
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --medium-gray: #6B7280;
    --text-gray: #4A5568;
    --border-gray: #E2E8F0;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-gray);
    background-color: var(--white);
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--navy);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--navy);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

p {
    margin-bottom: 1.5em;
    color: var(--text-gray);
    line-height: 1.8;
}

em {
    font-style: normal;
    color: var(--teal);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    padding: 100px 0;
}

.section-alt {
    background-color: var(--light-gray);
}

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal);
    margin-bottom: 16px;
    display: block;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    z-index: 1000;
    border-bottom: 1px solid var(--border-gray);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--teal);
}

nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

nav > a {
    color: var(--navy);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

nav > a:hover,
nav > a.active {
    color: var(--teal);
}

/* Dropdown styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    color: var(--navy);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown > a:hover,
.nav-dropdown > a.active {
    color: var(--teal);
}

.nav-dropdown > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu-inner {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(13, 27, 42, 0.12);
    padding: 8px;
    min-width: 220px;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--navy);
    font-size: 0.9rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--navy);
}

.dropdown-item.disabled {
    color: var(--medium-gray);
    cursor: default;
}

.dropdown-item.disabled:hover {
    background: transparent;
}

.dropdown-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-top: 2px;
}

.dropdown-item.disabled small {
    color: var(--teal);
}

.nav-cta {
    background-color: var(--teal);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.nav-cta:hover {
    background-color: var(--navy);
    color: var(--white) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--navy);
    margin: 5px 0;
}

/* ========================================
   PAGE HERO
   ======================================== */
.page-hero {
    padding-top: 160px;
    padding-bottom: 60px;
    text-align: center;
}

.page-hero h1 {
    margin-bottom: 20px;
}

.page-hero .subtitle {
    font-size: 1.2rem;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

.btn-primary:hover {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--navy);
    border-color: var(--border-gray);
}

.btn-secondary:hover {
    border-color: var(--navy);
}

.btn-white {
    background-color: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn-white:hover {
    background-color: var(--light-teal);
    border-color: var(--light-teal);
    color: var(--navy);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--navy);
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-section {
    padding: 60px 0 100px;
}

.contact-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-card {
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(13, 27, 42, 0.12);
}

.contact-card h3 {
    margin-bottom: 12px;
}

.contact-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Contact Form Card - Teal */
.contact-card-form {
    background: linear-gradient(135deg, var(--teal), var(--light-teal));
    color: var(--white);
}

.contact-card-form h3 {
    color: var(--white);
}

.contact-card-form p {
    color: rgba(255, 255, 255, 0.9);
}

/* Request Demo Card - Teal */
.contact-card-demo {
    background: linear-gradient(135deg, var(--teal), var(--light-teal));
    color: var(--white);
}

.contact-card-demo h3 {
    color: var(--white);
}

.contact-card-demo p {
    color: rgba(255, 255, 255, 0.9);
}

/* Email Card - Navy */
.contact-card-email {
    background: linear-gradient(135deg, var(--navy), #1a3a52);
    color: var(--white);
    cursor: default;
}

.contact-card-email:hover {
    transform: none;
    box-shadow: none;
}

.contact-card-email h3 {
    color: var(--white);
}

.contact-card-email p {
    color: rgba(255, 255, 255, 0.8);
}

.contact-card-email .email-address {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-card-email .email-address a {
    color: var(--light-teal);
    text-decoration: none;
}

.contact-card-email .email-address a:hover {
    text-decoration: underline;
}

/* ========================================
   POPUP / MODAL
   ======================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 27, 42, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--medium-gray);
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: var(--navy);
    color: var(--white);
}

.popup-content {
    width: 100%;
    height: 80vh;
    max-height: 700px;
}

.popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background-color: var(--navy);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background-color: var(--dark-navy);
    padding: 60px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.footer-logo span {
    color: var(--light-teal);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--light-teal);
}

.footer-copyright {
    width: 100%;
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media screen and (max-width: 900px) {
    .contact-options {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    section {
        padding: 60px 0;
    }

    .container,
    .container-narrow {
        padding: 0 24px;
    }

    .header-inner {
        padding: 16px 24px;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Mobile navigation */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 30px 40px;
        gap: 0;
        box-shadow: -5px 0 30px rgba(13, 27, 42, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    nav.mobile-open {
        right: 0;
    }

    nav > a {
        width: 100%;
        padding: 16px 0;
        border-bottom: 1px solid var(--border-gray);
        font-size: 1rem;
    }

    nav > a.nav-cta {
        margin-top: 20px;
        text-align: center;
        border-bottom: none;
    }

    /* Mobile dropdown */
    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid var(--border-gray);
    }

    .nav-dropdown > a {
        width: 100%;
        padding: 16px 0;
        font-size: 1rem;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        padding: 0;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu-inner {
        box-shadow: none;
        border: none;
        padding: 0 0 10px 15px;
        background: transparent;
    }

    .dropdown-item {
        padding: 10px 0;
    }

    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }

    .page-hero {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .contact-card {
        padding: 40px 30px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}
