/* ============================================
   ALPENA GENERAL HOSPITAL — Stylesheet
   Palette: Emerald Green + Cream
   ============================================ */

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

:root {
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    --emerald-950: #022c22;
    
    --cream-50:  #fefcf3;
    --cream-100: #fdf9e8;
    --cream-200: #faf0c8;
    --cream-300: #f5e4a0;
    
    --stone-50:  #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 3px rgba(6,78,59,0.06), 0 1px 2px rgba(6,78,59,0.04);
    --shadow-md: 0 4px 16px rgba(6,78,59,0.08), 0 2px 6px rgba(6,78,59,0.05);
    --shadow-lg: 0 12px 40px rgba(6,78,59,0.12), 0 4px 12px rgba(6,78,59,0.06);
    --shadow-xl: 0 24px 60px rgba(6,78,59,0.14), 0 8px 20px rgba(6,78,59,0.08);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--stone-800);
    background-color: var(--cream-50);
}

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

a {
    color: var(--emerald-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-emerald {
    background: var(--emerald-700);
    color: #ffffff;
    border-color: var(--emerald-700);
}

.btn-emerald:hover {
    background: var(--emerald-800);
    border-color: var(--emerald-800);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--stone-700);
    border-color: var(--stone-300);
}

.btn-ghost:hover {
    border-color: var(--emerald-400);
    color: var(--emerald-700);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(254,252,243,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--stone-200);
    transition: box-shadow 0.3s ease;
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--emerald-800);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-logo-icon {
    color: var(--emerald-700);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--stone-600);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--emerald-500);
    transition: width 0.25s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--stone-700);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, var(--cream-50) 0%, var(--cream-100) 50%, var(--emerald-50) 100%);
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(6,95,70,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16,185,129,0.06) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(6,78,59,0.03) 0%, transparent 40%);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,95,70,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 540px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--emerald-700);
    background: var(--emerald-50);
    border: 1px solid var(--emerald-200);
    padding: 7px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-500);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--stone-900);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-headline em {
    color: var(--emerald-700);
    font-style: italic;
}

.hero-subhead {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--stone-600);
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* --- Floating Stat Cards --- */
.hero-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 420px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--stone-100);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--emerald-300);
}

.stat-card--1::before { background: var(--emerald-400); }
.stat-card--2::before { background: var(--emerald-500); }
.stat-card--3::before { background: var(--emerald-600); }
.stat-card--4::before { background: var(--emerald-700); }

.stat-card-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    color: var(--emerald-800);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--stone-500);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stat-card-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--emerald-50);
    opacity: 0.6;
}

/* --- Section Shared --- */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--emerald-600);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--stone-900);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--stone-500);
    max-width: 560px;
    line-height: 1.75;
}

.section-header {
    margin-bottom: 56px;
}

/* --- Services --- */
.services {
    padding: 100px 24px;
    background: #ffffff;
}

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

.service-card {
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stone-200);
    background: var(--cream-50);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--emerald-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-700);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--stone-800);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--stone-500);
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 100px 24px;
    background: var(--cream-50);
}

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

.about-image {
    position: relative;
}

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

.about-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-xl);
    background: var(--emerald-100);
    z-index: -1;
}

.about-content {
    max-width: 480px;
}

.about-text {
    font-size: 1rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 32px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--stone-700);
}

.about-feature svg {
    color: var(--emerald-600);
    flex-shrink: 0;
}

/* --- Departments --- */
.departments {
    padding: 100px 24px;
    background: #ffffff;
}

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

.dept-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--stone-200);
    background: var(--cream-50);
    transition: all 0.3s ease;
}

.dept-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--emerald-200);
}

.dept-card-img {
    overflow: hidden;
    height: 200px;
}

.dept-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dept-card:hover .dept-card-img img {
    transform: scale(1.05);
}

.dept-card-body {
    padding: 24px;
}

.dept-card-body h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--stone-800);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.dept-card-body p {
    font-size: 0.9375rem;
    color: var(--stone-500);
    line-height: 1.7;
}

/* --- Visit --- */
.visit {
    padding: 100px 24px;
    background: var(--cream-50);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.visit-info {
    max-width: 480px;
}

.visit-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.visit-detail {
    display: flex;
    gap: 16px;
}

.visit-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-700);
    flex-shrink: 0;
}

.visit-detail strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--stone-800);
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.visit-detail p {
    font-size: 0.9375rem;
    color: var(--stone-500);
    line-height: 1.6;
}

.visit-map {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--stone-200);
    height: 440px;
}

/* --- CTA --- */
.cta {
    padding: 100px 24px;
    background: var(--emerald-800);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.cta-text {
    padding-top: 12px;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 500;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.cta-desc {
    font-size: 1.0625rem;
    color: var(--emerald-200);
    line-height: 1.75;
    max-width: 440px;
}

.cta-form-wrapper {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-xl);
}

.cta-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--stone-700);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--stone-800);
    background: var(--cream-50);
    border: 1.5px solid var(--stone-200);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

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

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

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success svg {
    color: var(--emerald-500);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--stone-800);
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--stone-500);
    max-width: 280px;
    line-height: 1.6;
}

/* --- Footer --- */
.footer {
    background: var(--stone-900);
    color: var(--stone-400);
    padding: 72px 24px 0;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--stone-800);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-logo svg {
    color: var(--emerald-400);
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--stone-500);
    max-width: 280px;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--stone-300);
    margin-bottom: 18px;
}

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

.footer-col a {
    font-size: 0.9375rem;
    color: var(--stone-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--stone-600);
}

.footer-legal {
    font-size: 0.8125rem;
    color: var(--stone-600) !important;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .hero-cards {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-subhead {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .services-grid,
    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid,
    .visit-grid,
    .cta-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-content {
        max-width: 100%;
    }
    
    .visit-info {
        max-width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(254,252,243,0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--stone-200);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
    }
    
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        min-height: auto;
        padding: 120px 24px 80px;
    }
    
    .hero-cards {
        grid-template-columns: 1fr 1fr;
        max-width: 360px;
    }
    
    .services-grid,
    .dept-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image img {
        height: 320px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cta-form-wrapper {
        padding: 24px;
    }
    
    .visit-map {
        height: 300px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-cards {
        grid-template-columns: 1fr;
        max-width: 240px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .dept-card:hover {
        transform: none;
    }
    
    .dept-card-img img {
        transform: none;
    }
}
