/* Sathi Child Wellness - Professional Sky-Blue Theme */
:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #38bdf8;
    --primary-soft: #e0f2fe;
    --primary-subtle: #bae6fd;
    --info: #0ea5e9;
    --info-soft: #f0f9ff;
    --text: #0f172a;
    --muted: #475569;
    --bg: #f0f9ff;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(2, 132, 199, 0.08);
    --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.06);
    --radius: 24px;

    /* Bootstrap 5 Theme Variable Mappings */
    --bs-primary: #0284c7;
    --bs-primary-rgb: 2, 132, 199;
    --bs-primary-text-emphasis: #0369a1;
    --bs-primary-bg-subtle: #e0f2fe;
    --bs-primary-border-subtle: #bae6fd;
    --bs-info: #0ea5e9;
    --bs-info-rgb: 14, 165, 233;
    --bs-info-text-emphasis: #0284c7;
    --bs-info-bg-subtle: #f0f9ff;
    --bs-info-border-subtle: #bae6fd;
    --bs-link-color: #0284c7;
    --bs-link-hover-color: #0369a1;
}

/* Bootstrap Utility Overrides */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-subtle {
    background-color: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
}

.border-primary-subtle {
    border-color: var(--primary-subtle) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.text-info {
    color: var(--info) !important;
}

.hero-section .text-info {
    color: #7dd3fc !important;
}

.badge.bg-primary-subtle {
    background-color: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(2, 132, 199, 0.18);
}

.badge.bg-light.text-primary {
    background-color: #ffffff !important;
    color: var(--primary) !important;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
    color: var(--text);
    line-height: 1.7;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

p {
    margin-bottom: 0;
}

section {
    position: relative;
    overflow: hidden;
}

.top-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    padding: 0.35rem 0;
}

.top-bar .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-bar .contact-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.top-bar .topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.top-bar .topbar-link:hover {
    opacity: 0.85;
}

.top-bar .social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.top-bar .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.top-bar .social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(2, 132, 199, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--primary) !important;
}

.navbar-brand img {
    filter: drop-shadow(0 6px 10px rgba(2, 132, 199, 0.16));
}

.nav-link {
    color: #334155 !important;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    transform: translateY(-1px);
}

.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    min-height: 80vh;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 35%);
    pointer-events: none;
}

.hero-content,
.hero-image-placeholder {
    position: relative;
    z-index: 1;
}

.badge {
    letter-spacing: 0.04em;
    font-weight: 600;
}

.hero-description,
.about-description {
    color: rgba(255, 255, 255, 0.93);
    font-size: 1.08rem;
    line-height: 1.9;
    text-align: justify;
    text-justify: inter-word;
    max-width: 620px;
}

.about-description {
    color: #475569;
    max-width: none;
}

.display-4 {
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.btn {
    border-radius: 999px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.22);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #38bdf8 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, var(--info) 100%) !important;
    color: #ffffff !important;
}

.section-label {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(2, 132, 199, 0.15);
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
    margin-bottom: 0;
}

.card {
    border: 1px solid rgba(2, 132, 199, 0.08);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: rgba(255, 255, 255, 0.98);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.22);
}

.card-body {
    padding: 1.5rem;
}

.card h5 {
    letter-spacing: -0.02em;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(2, 132, 199, 0.12) !important;
}

.form-control {
    border-radius: 14px;
    border: 1px solid rgba(2, 132, 199, 0.15);
    padding: 0.85rem 1rem;
    background: #f8fcff;
}

.form-control:focus {
    border-color: rgba(2, 132, 199, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.16);
    background: #ffffff;
}

footer {
    border-top: 5px solid var(--primary);
    background: linear-gradient(180deg, #0b1727 0%, #07101b 100%) !important;
}

footer .text-secondary {
    color: rgba(255, 255, 255, 0.72) !important;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #7dd3fc !important;
}

/* Footer Brand & Logo Alignment */
footer .footer-brand,
footer h5.d-flex {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.65rem;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

footer .footer-logo,
footer h5 img {
    height: 32px !important;
    width: 32px !important;
    max-height: 32px !important;
    max-width: 32px !important;
    object-fit: contain;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    vertical-align: middle;
}

/* Footer Contact Information */
footer .footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-left: 0;
    margin-bottom: 0;
}

footer .footer-contact-item {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

footer .footer-contact-item i {
    width: 18px;
    text-align: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

footer .footer-phone-group {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.6rem;
}

/* Call Button Styling */
.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem !important;
    min-height: auto !important;
    min-width: auto !important;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.2;
}

.call-btn:hover {
    background: linear-gradient(135deg, var(--info) 0%, var(--primary) 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Page header blocks for internal pages */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4.5rem 0 3.5rem;
    color: #fff;
}

.page-banner h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.page-banner p {
    color: rgba(255, 255, 255, 0.88);
    max-width: 680px;
    margin: 0 auto;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

.animate-slide-in {
    animation: slideInRight 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section {
        min-height: 65vh;
    }
}

@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        height: 32px !important;
    }

    .display-4 {
        font-size: 2rem;
    }

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

    .hero-section {
        min-height: auto;
        padding: 2.5rem 0;
    }

    .page-banner {
        padding: 3rem 0 2.5rem;
    }

    .page-banner h1 {
        font-size: 2rem;
    }

    .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    /* Top Bar Mobile Improvements */
    .top-bar {
        padding: 0.35rem 0 !important;
    }

    .top-bar .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.35rem 0.65rem !important;
    }

    .top-bar .contact-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.4rem 0.85rem !important;
        width: auto !important;
        font-size: 0.76rem !important;
    }

    .top-bar .topbar-link {
        font-size: 0.76rem !important;
        min-height: auto !important;
        min-width: auto !important;
        padding: 0 !important;
    }

    .top-bar .social-links {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: auto !important;
        margin-left: auto;
    }

    .top-bar .social-link {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.74rem !important;
        min-height: auto !important;
        min-width: auto !important;
        padding: 0 !important;
    }

    /* Navbar Mobile Improvements */
    .navbar {
        padding: 0.75rem 0 !important;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }

    .navbar-brand img {
        height: 32px !important;
        margin-right: 0.5rem !important;
    }

    .navbar-toggler {
        padding: 0.2rem 0.5rem;
        border: none;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .nav-link {
        padding: 0.5rem 0 !important;
        margin-bottom: 0.5rem;
    }

    /* Hero Section Mobile Improvements */
    .hero-section {
        padding: 2rem 0 !important;
        min-height: auto !important;
    }

    .hero-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .display-4 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    .display-4 br {
        display: none;
    }

    .hero-description {
        font-size: 0.95rem !important;
        text-align: left;
        text-justify: none;
        line-height: 1.6;
    }

    .badge {
        font-size: 0.7rem !important;
    }

    /* Buttons Mobile Improvements */
    .btn {
        padding: 0.65rem 1rem !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
    }

    .btn-lg {
        padding: 0.65rem 1rem !important;
    }

    .d-flex.flex-wrap.gap-3 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .d-flex.flex-wrap.gap-3 > * {
        width: 100%;
    }

    /* Section Spacing Mobile Improvements */
    .section-title {
        font-size: 1.5rem !important;
    }

    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    section.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Card Mobile Improvements */
    .card {
        border-radius: 16px !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .card h5 {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* About Description Mobile Improvements */
    .about-description {
        font-size: 0.95rem !important;
        line-height: 1.6;
        text-align: left;
    }

    /* Page Banner Mobile Improvements */
    .page-banner {
        padding: 2.5rem 0 2rem !important;
    }

    .page-banner h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .page-banner p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Form Control Mobile Improvements */
    .form-control {
        font-size: 1rem;
        padding: 0.75rem 0.875rem !important;
        border-radius: 12px !important;
    }

    .form-control::placeholder {
        font-size: 0.95rem;
    }

    /* Row Gap Mobile Improvements */
    .row.g-4 {
        gap: 1rem !important;
    }

    .row.g-3 {
        gap: 0.75rem !important;
    }

    /* Grid Alignment Mobile Improvements */
    .col-md-6 {
        margin-bottom: 0.5rem;
    }

    /* Image Improvements */
    img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    /* List Mobile Improvements */
    ul.list-unstyled li {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0.25rem 0;
    }

    /* Section Label Mobile Improvements */
    .section-label {
        font-size: 0.65rem !important;
    }

    /* Container Padding Mobile */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Text Alignment Mobile */
    .text-center {
        text-align: center;
    }

    /* Team Card Mobile Improvements */
    .card-body div[style*="width: 120px"] {
        width: 100px !important;
        height: 100px !important;
    }

    /* Footer Mobile Improvements */
    footer {
        padding-top: 2rem !important;
    }

    footer .row {
        gap: 1.5rem;
    }

    footer h5 {
        font-size: 1rem;
        margin-bottom: 0.85rem !important;
    }

    footer .footer-brand,
    footer h5.d-flex {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.55rem;
        font-size: 1.1rem;
        margin-bottom: 0.85rem !important;
    }

    footer .footer-logo,
    footer h5 img {
        height: 28px !important;
        width: 28px !important;
        max-height: 28px !important;
        max-width: 28px !important;
        object-fit: contain;
        display: inline-block !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    footer p,
    footer li,
    footer a {
        font-size: 0.9rem;
    }

    footer .footer-contact-list {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    footer .footer-contact-item {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 0.5rem;
    }

    footer .footer-phone-group {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 0.5rem;
    }

    footer .quick-links-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
    }

    footer .quick-links-list li {
        margin-bottom: 0 !important;
    }

    footer a {
        min-height: auto !important;
        min-width: auto !important;
    }

    /* Margin/Padding Utilities Mobile */
    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-5 {
        margin-top: 2rem !important;
    }

    /* Overflow Prevention */
    body,
    html {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
    }

    /* Sticky Header Mobile */
    .sticky-top {
        top: 0;
        z-index: 1020;
    }

    /* Flexbox Adjustments for Mobile */
    .d-flex {
        flex-wrap: wrap;
    }

    .align-items-center {
        align-items: center;
    }
}

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
    .top-bar {
        padding: 0.3rem 0 !important;
    }

    .top-bar .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.3rem 0.5rem !important;
    }

    .top-bar .contact-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.3rem 0.65rem !important;
        font-size: 0.72rem !important;
        width: auto !important;
    }

    .top-bar .topbar-link {
        font-size: 0.72rem !important;
        min-height: auto !important;
        min-width: auto !important;
        padding: 0 !important;
    }

    .top-bar .social-links {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.4rem !important;
        width: auto !important;
        margin-left: auto;
    }

    .top-bar .social-link {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.7rem !important;
        min-height: auto !important;
        min-width: auto !important;
        padding: 0 !important;
    }

    .navbar-brand {
        font-size: 0.8rem;
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-brand img {
        height: 28px !important;
        margin-right: 0.35rem !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
    }

    .badge {
        font-size: 0.6rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    .btn {
        padding: 0.55rem 0.9rem !important;
        font-size: 0.85rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .section-title {
        font-size: 1.3rem !important;
    }

    .page-banner h1 {
        font-size: 1.3rem !important;
    }

    .card-body {
        padding: 0.875rem !important;
    }

    .card h5 {
        font-size: 0.9rem;
    }

    .card p {
        font-size: 0.85rem;
    }

    section {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Touch-friendly spacing for small screens */
    a, button {
        min-height: 48px;
        min-width: 48px;
        padding: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 0 !important;
    }

    /* Footer Extra Small Screen Improvements */
    footer .footer-brand,
    footer h5.d-flex {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        font-size: 1.05rem;
        gap: 0.45rem;
    }

    footer .footer-logo,
    footer h5 img {
        height: 26px !important;
        width: 26px !important;
        max-height: 26px !important;
        max-width: 26px !important;
    }

    footer a, 
    footer button {
        min-height: auto !important;
        min-width: auto !important;
        padding: 0 !important;
    }

    footer .call-btn {
        padding: 0.2rem 0.55rem !important;
        font-size: 0.72rem !important;
        min-height: auto !important;
        min-width: auto !important;
    }

    /* Better spacing for form elements on small screens */
    .form-control {
        min-height: 44px;
        font-size: 1rem;
    }

    .form-control:focus {
        outline: none;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover transforms on touch devices to prevent jank */
    .btn:hover {
        transform: none;
    }

    .card:hover {
        transform: none;
    }

    .feature-card:hover {
        transform: none;
    }

    .nav-link:hover {
        transform: none;
    }

    /* Increase tap target sizes */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem !important;
    }

    .nav-link {
        padding: 0.75rem 0.5rem !important;
    }
}
