/* ============================================
   Medimer Medical Clinic — Styles
   Palette: Plum + Amber | Serif: Playfair Display
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --plum-900: #2D1B2E;
    --plum-800: #3D2640;
    --plum-700: #5D3A5B;
    --plum-600: #7A4D78;
    --plum-500: #9B6598;
    --plum-400: #B889B5;
    --plum-100: #F3EBF2;
    --plum-50:  #FAF5FC;

    --amber-700: #92560A;
    --amber-600: #B8730D;
    --amber-500: #D4900A;
    --amber-400: #E8A825;
    --amber-300: #F0C055;
    --amber-200: #F7D88A;
    --amber-100: #FDF0CC;
    --amber-50:  #FFFBF0;

    --gray-900: #1A1A2E;
    --gray-800: #2D2D44;
    --gray-700: #40405C;
    --gray-600: #555570;
    --gray-500: #6B6B85;
    --gray-400: #8888A0;
    --gray-300: #B0B0C4;
    --gray-200: #D4D4E2;
    --gray-100: #EEEEE8;
    --gray-50:  #F7F7F4;

    --white: #FFFFFF;
    --cream: #FDF9F6;

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', 'Segoe UI', system-ui, sans-serif;

    --shadow-sm: 0 1px 3px rgba(45, 27, 46, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 27, 46, 0.10);
    --shadow-lg: 0 8px 32px rgba(45, 27, 46, 0.14);
    --shadow-xl: 0 16px 48px rgba(45, 27, 46, 0.18);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--plum-600);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--plum-500); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--plum-700);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: 600;
}
.skip-link:focus {
    top: 16px;
    color: var(--white);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--amber {
    background: var(--amber-500);
    color: var(--gray-900);
    border-color: var(--amber-500);
}
.btn--amber:hover {
    background: var(--amber-400);
    border-color: var(--amber-400);
    color: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--plum {
    background: var(--plum-700);
    color: var(--white);
    border-color: var(--plum-700);
}
.btn--plum:hover {
    background: var(--plum-600);
    border-color: var(--plum-600);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}
.btn--outline-light:hover {
    background: var(--white);
    color: var(--plum-800);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn--lg {
    padding: 18px 40px;
    font-size: 1.05rem;
}

.btn--full {
    width: 100%;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(45, 27, 46, 0.0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: all var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(45, 27, 46, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo--light .logo-text { color: var(--white); }

.navbar nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar nav ul li a:not(.btn) {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.navbar nav ul li a:not(.btn):hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after  { top: 8px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--plum-900);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(45, 27, 46, 0.92) 0%,
        rgba(93, 58, 91, 0.80) 50%,
        rgba(45, 27, 46, 0.88) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 140px 24px 100px;
    max-width: 800px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber-400);
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 24px;
    max-width: 700px;
}

.hero-title em {
    font-style: italic;
    color: var(--amber-300);
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.80);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    list-style: none;
}

.hero-badges li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.hero-badges li svg {
    width: 18px;
    height: 18px;
    color: var(--amber-400);
    flex-shrink: 0;
}

/* --- Section Shared --- */
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber-600);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--plum-900);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--gray-600);
    max-width: 640px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .section-eyebrow {
    color: var(--plum-500);
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* --- Intro --- */
.intro {
    padding: 100px 0;
    background: var(--cream);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.intro-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.intro-text .section-title {
    margin-bottom: 24px;
}

.intro-text p {
    color: var(--gray-600);
    margin-bottom: 16px;
    font-size: 1.02rem;
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    background: var(--cream);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    border: 1px solid var(--plum-100);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--plum-400);
    background: var(--white);
}

.service-icon {
    width: 56px;
    height: 56px;
    color: var(--plum-600);
    margin-bottom: 24px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--plum-800);
    margin-bottom: 12px;
    line-height: 1.35;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* --- Immigration --- */
.immigration {
    padding: 100px 0;
    background: var(--plum-900);
    color: var(--white);
}

.immigration-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.immigration .section-eyebrow {
    color: var(--amber-400);
}

.immigration .section-title {
    color: var(--white);
    margin-bottom: 24px;
}

.immigration > .container > .immigration-layout > .immigration-content > p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.immigration-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.immigration-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
}

.immigration-list li svg {
    width: 20px;
    height: 20px;
    color: var(--amber-400);
    flex-shrink: 0;
    margin-top: 2px;
}

.immigration-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.immigration-note {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.50);
    font-style: italic;
}

.immigration-image img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* --- Why Us --- */
.why-us {
    padding: 100px 0;
    background: var(--plum-50);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.why-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 44px 36px;
    border: 1px solid var(--plum-100);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--plum-600), var(--amber-500));
    opacity: 0;
    transition: opacity var(--transition);
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.why-card:hover::before {
    opacity: 1;
}

.why-number {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--plum-100);
    line-height: 1;
    margin-bottom: 16px;
}

.why-card h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--plum-800);
    margin-bottom: 12px;
    line-height: 1.35;
}

.why-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* --- Testimonials --- */
.testimonials {
    padding: 100px 0;
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial {
    background: var(--cream);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    border: 1px solid var(--plum-100);
    position: relative;
    transition: all var(--transition);
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-quote {
    width: 36px;
    height: 36px;
    color: var(--plum-300);
    margin-bottom: 20px;
}

.testimonial p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial footer {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--plum-600);
    font-style: normal;
    letter-spacing: 0.04em;
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--plum-800) 0%, var(--plum-700) 100%);
    color: var(--white);
}

.cta-inner {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.cta-eyebrow {
    color: var(--amber-400);
}

.cta-title {
    color: var(--white);
    margin-bottom: 20px;
}

.cta-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* --- Contact --- */
.contact {
    padding: 100px 0;
    background: var(--cream);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info address {
    font-style: normal;
    margin-bottom: 28px;
}

.contact-info p {
    color: var(--gray-700);
    line-height: 1.8;
}

.contact-info p strong {
    color: var(--plum-800);
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.contact-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--gray-700);
    font-size: 1rem;
}

.contact-details li svg {
    width: 20px;
    height: 20px;
    color: var(--plum-500);
    flex-shrink: 0;
}

.contact-details li a {
    color: var(--plum-700);
    font-weight: 500;
}

.contact-details li a:hover {
    color: var(--plum-500);
}

.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 44px 36px;
    border: 1px solid var(--plum-100);
    box-shadow: var(--shadow-sm);
}

.contact-form-wrapper h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--plum-800);
    margin-bottom: 28px;
}

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

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--cream);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--plum-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(93, 58, 91, 0.10);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 20px;
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-radius: var(--radius-sm);
    color: #2E7D32;
    font-size: 0.92rem;
    font-weight: 500;
}

.form-success svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #2E7D32;
}

/* --- Footer --- */
.footer {
    background: var(--plum-900);
    color: rgba(255, 255, 255, 0.70);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.92rem;
    line-height: 1.75;
    max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.60);
    font-size: 0.92rem;
    transition: color var(--transition);
}

.footer-links ul li a:hover {
    color: var(--amber-400);
}

.footer-contact p {
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 4px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.60);
}

.footer-contact a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.40);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default visible state for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid .testimonial:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .navbar nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--plum-900);
        padding: 100px 32px 40px;
        transition: right var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .navbar nav.open {
        right: 0;
    }

    .navbar nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .navbar nav ul li a:not(.btn) {
        display: block;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .navbar nav ul li:last-child {
        margin-top: 16px;
    }

    .navbar nav ul li .btn {
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        padding: 120px 24px 80px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .intro-grid,
    .immigration-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .intro-image {
        order: -1;
    }

    .intro-image img {
        height: 280px;
    }

    .immigration-image img {
        height: 400px;
    }

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

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

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

    .testimonials-grid .testimonial:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .section-title {
        font-size: 1.6rem;
    }

    .service-card {
        padding: 28px 24px;
    }

    .contact-form-wrapper {
        padding: 28px 20px;
    }
}
