:root {
    --color-primary: #FF7E47;
    --color-primary-hover: #e06d3d;
    --color-dark: #1A150A;
    --color-dark-transparent: rgba(26, 21, 10, 0.8);
    --color-light: #F9FAFB;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;

    --font-main: 'Inter', sans-serif;

    --radius-card: 40px;
    --radius-button: 9999px;
    /* Pill shape */

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-primary: 0 10px 30px rgba(255, 126, 71, 0.3);

    --spacing-container: 1200px;
    --spacing-section: 6rem;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-light);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-card);
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 126, 71, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

header.scrolled {
    padding: 0.8rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    /* Adjust height to fit nicely in the header */
    width: auto;
    border-radius: 0;
    /* Keep original logo shape */
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-dark);
}

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

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-button);
    font-weight: 700;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-emergency {
    background-color: #A50000;
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 15px rgba(165, 0, 0, 0.3);
}

.btn-emergency:hover {
    background-color: #8a0000;
}

/* Sections */
section {
    padding: var(--spacing-section) 0;
}

/* Hero */
.hero {
    padding-top: 10rem;
    padding-bottom: 8rem;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 span {
    color: var(--color-primary);
}

.hero .subline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    display: block;
}

.hero p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Info Cards */
.info-cards {
    margin-top: -4rem;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-highlight {
    background-color: #8B0000;
    color: white;
}

.card-highlight h3,
.card-highlight p {
    color: white;
}

.highlight-phone {
    background: white;
    color: #8B0000;
    padding: 1rem;
    border-radius: var(--radius-card);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 1rem;
    display: block;
}

/* Doctors */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.doctor-card {
    text-align: center;
}

.doctor-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius-card);
    margin: 0 auto 1.5rem;
    background-color: #eee;
}

.doctor-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.doctor-card span {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sleep Lab Feature */
.feature-section {
    background-color: var(--color-dark);
    color: white;
    border-radius: var(--radius-card);
    overflow: hidden;
    margin: 2rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.feature-content {
    padding: 4rem;
}

.feature-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-content .tag {
    color: var(--color-primary);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-image {
    height: 100%;
    min-height: 400px;
    background-color: #333;
    /* Placeholder */
    object-fit: cover;
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: var(--color-primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    font-size: 0.9rem;
}

/* Accordion / Details */
details {
    background: var(--color-light);
    border-radius: 20px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

details[open] {
    background: var(--color-white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

summary {
    padding: 1rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-dark);
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
    content: '+';
}

.details-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.details-content strong {
    color: var(--color-primary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hide-mobile {
    display: inline-block;
}

/* Header UI Elements */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-dark);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-white);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    text-align: center;
}

.mobile-nav li {
    margin-bottom: 2rem;
}

.mobile-nav a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-dark);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --spacing-section: 4rem;
    }

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

@media (max-width: 768px) {

    .main-nav,
    .hide-mobile {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

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

    .hero-content {
        padding: 1.5rem;
        border-radius: 30px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .info-cards {
        margin-top: -2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .feature-content {
        padding: 2rem;
    }

    .feature-image {
        height: 250px;
        min-height: auto;
    }

    .team-grid {
        gap: 2rem;
    }

    .doctor-img {
        width: 200px;
        height: 200px;
    }

    footer {
        padding: 3rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    section {
        padding: var(--spacing-section) 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .highlight-phone {
        font-size: 1.2rem;
    }

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

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevent iOS zoom on focus */
    }

    .container {
        padding: 0 15px;
    }
}