/* ============================================================
   Dr. RP SINHA Hospital — Full-Width Premium Theme
   Hospital Color System: Trust Blue + Clean White + Warm Accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

/* ─── CSS Variables ─── */
:root {
    --hospital-blue: #1565c0;
    --hospital-blue-dk: #0d47a1;
    --hospital-blue-lt: #e3f2fd;
    --hospital-teal: #00897b;
    --hospital-red: #c62828;
    --hospital-gold: #f9a825;
    --text-dark: #1a1a2e;
    --text-body: #374151;
    --text-muted: #6b7280;
    --surface: #f0f4f8;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, .07);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, .10);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, .15);
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all .4s cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-body);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    line-height: 1.15;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

/* ─── Utility ─── */
.section-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--hospital-blue);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* ─── Navigation ─── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 22px 0;
    transition: var(--transition);
}

.site-nav.scrolled {
    background: var(--white);
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 5%;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    transition: var(--transition);
}

.site-nav.scrolled .nav-logo {
    color: var(--hospital-blue-dk);
}

.nav-logo span {
    color: var(--hospital-gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .85);
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--hospital-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--white);
}

.site-nav.scrolled .nav-links a {
    color: var(--text-body);
}

.site-nav.scrolled .nav-links a:hover {
    color: var(--hospital-blue);
}

.btn-nav {
    background: var(--hospital-gold);
    color: var(--text-dark) !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700 !important;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(249, 168, 37, .4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 168, 37, .5);
}

.btn-nav::after {
    display: none !important;
}

/* ─── Mobile Menu ─── */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.site-nav.scrolled .mobile-menu-toggle {
    color: var(--hospital-blue-dk);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -260px;
        width: 250px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px;
        gap: 20px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text-dark);
        font-size: 1.1rem;
        width: 100%;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a:hover {
        color: var(--hospital-blue);
    }

    .btn-nav {
        width: 100%;
        margin-top: 10px;
        background: var(--hospital-blue);
        color: #fff !important;
        border: none;
    }
}

/* ─── Hero ─── */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #00695c 100%);
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .18;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, .05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 168, 37, .08) 0%, transparent 40%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 140px 5% 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50px;
    padding: 8px 20px;
    margin-bottom: 28px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--hospital-gold);
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-title em {
    font-style: italic;
    color: var(--hospital-gold);
}

.hero-desc {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--hospital-gold);
    color: var(--text-dark);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(249, 168, 37, .4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(249, 168, 37, .5);
    color: var(--text-dark);
}

.btn-hero-outline {
    background: transparent;
    color: var(--white);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, .5);
    transition: var(--transition);
    cursor: pointer;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, .1);
    border-color: var(--white);
    color: var(--white);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.stat-item h3 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 4px;
}

.stat-item p {
    font-size: .8rem;
    color: rgba(255, 255, 255, .65);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Hero Right — Appointment Card */
.hero-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-card-header {
    background: linear-gradient(135deg, var(--hospital-blue-dk), var(--hospital-teal));
    padding: 28px 32px;
    color: var(--white);
}

.hero-card-header h4 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.hero-card-header p {
    opacity: .8;
    font-size: .9rem;
}

.hero-card-body {
    padding: 32px;
}

/* ─── Form Controls ─── */
.form-field {
    width: 100%;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0 18px;
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    background: #fafbfc;
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

.form-field:focus {
    border-color: var(--hospital-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, .1);
}

textarea.form-field {
    height: auto;
    padding: 14px 18px;
    resize: none;
}

.field-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: .3px;
}

.field-group {
    margin-bottom: 18px;
}

/* Service Toggle Buttons */
.service-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.service-toggle label {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    background: var(--white);
}

.service-toggle input[type="radio"] {
    display: none;
}

.service-toggle input[type="radio"]:checked+span,
.service-toggle label.active {
    border-color: var(--hospital-blue);
    background: var(--hospital-blue-lt);
    color: var(--hospital-blue);
}

.service-toggle label:hover {
    border-color: var(--hospital-blue);
    color: var(--hospital-blue);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hospital-blue-dk), var(--hospital-blue));
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(21, 101, 192, .3);
    font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(21, 101, 192, .4);
}

/* ─── Stats Bar ─── */
.stats-bar {
    background: var(--hospital-blue-dk);
    padding: 40px 5%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stats-bar-item {
    text-align: center;
}

.stats-bar-item h3 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 4px;
}

.stats-bar-item p {
    font-size: .85rem;
    color: rgba(255, 255, 255, .65);
}

/* ─── Services Section ─── */
.services-section {
    padding: 100px 5%;
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 60px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--hospital-blue), var(--hospital-teal));
    transform: scaleY(0);
    transform-origin: top;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleY(1);
}

.svc-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--hospital-blue-lt);
    color: var(--hospital-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    transition: var(--transition);
}

.service-card:hover .svc-icon {
    background: var(--hospital-blue);
    color: var(--white);
}

.service-card h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.svc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--hospital-blue);
}

/* ─── About Section ─── */
.about-section {
    padding: 100px 5%;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-img-wrap {
    position: relative;
}

.about-img-wrap img {
    border-radius: var(--radius-xl);
    width: 100%;
    object-fit: cover;
    height: 560px;
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--hospital-blue-dk);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.about-badge h3 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 4px;
}

.about-badge p {
    font-size: .8rem;
    opacity: .8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 36px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--hospital-blue-lt);
    color: var(--hospital-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.feature-item h5 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.feature-item p {
    font-size: .875rem;
    color: var(--text-muted);
}

/* ─── Why Choose Us ─── */
.why-section {
    padding: 100px 5%;
    background: linear-gradient(135deg, var(--hospital-blue-dk) 0%, #1565c0 60%, var(--hospital-teal) 100%);
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.why-inner {
    position: relative;
    z-index: 1;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 60px;
}

.why-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.why-card:hover {
    background: rgba(255, 255, 255, .15);
    transform: translateY(-8px);
}

.why-icon {
    font-size: 2.5rem;
    color: var(--hospital-gold);
    margin-bottom: 20px;
}

.why-card h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.why-card p {
    color: rgba(255, 255, 255, .7);
    font-size: .875rem;
    line-height: 1.7;
}

/* ─── Footer ─── */
.site-footer {
    background: #0a0f1e;
    padding: 80px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand span {
    color: var(--hospital-gold);
}

.footer-desc {
    color: rgba(255, 255, 255, .5);
    font-size: .9rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: .9rem;
}

.social-btn:hover {
    background: var(--hospital-blue);
    color: var(--white);
}

.footer-col h5 {
    color: var(--white);
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: .5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, .5);
    font-size: .875rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--hospital-gold);
    padding-left: 6px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-contact-item i {
    color: var(--hospital-gold);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-contact-item p {
    color: rgba(255, 255, 255, .5);
    font-size: .875rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, .35);
    font-size: .8rem;
}

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 600px;
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero-inner {
        padding: 120px 5% 60px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Global Appointment Modal (Mobile) --- */
.appointment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(5px);
}

.appointment-modal-overlay.active {
    display: block;
}

.hero-card.mobile-modal-active {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: 95% !important;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}