/* ===== Dickory Docks – Site Styles ===== */

:root {
    --primary: #2E86AB;
    --primary-dark: #1a6a8a;
    --secondary: #F6AE2D;
    --accent: #F26419;
    --green: #4CAF50;
    --light-bg: #F8FAFB;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --card-radius: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
    background: #fff;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 0.9rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-icon {
    font-size: 1.6rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== ADAPTIVE NAVBAR COLLAPSE =====
   navbar-expand-lg switches to the always-inline desktop layout at any
   viewport >= 992px, regardless of whether the menu content actually
   fits at that width - with a brand name + logo + this many top-level
   items, it typically needs ~2000px+ to fit on one line, so anything
   from 992px up to that point would otherwise overflow sideways
   instead of collapsing. wwwroot/js/nav-responsive.js measures the
   real content width on load/resize and adds .force-collapse to the
   <nav> when it doesn't fit, which this override then folds back into
   the normal (< 992px) hamburger behaviour regardless of viewport
   width. Scoped to the same >=992px range navbar-expand-lg governs,
   so nothing here touches genuinely small/mobile screens. */
@media (min-width: 992px) {
    .navbar.force-collapse .navbar-toggler {
        display: block;
    }

    .navbar.force-collapse .navbar-collapse {
        display: none;
        flex-basis: 100%;
        flex-grow: 1;
    }

    .navbar.force-collapse .navbar-collapse.show {
        display: block;
    }

    .navbar.force-collapse .navbar-nav {
        flex-direction: column;
    }
}

/* ===== SITE RIBBON =====
   Optional notice bar shown on the home page, between the nav and the
   hero section - edited from Admin > NMS Configuration ("Ribbon
   Information"). Only rendered at all when that value is non-blank
   (see Views/Home/Index.cshtml), so there's no empty gap when it's
   not in use. Text scrolls right-to-left continuously, like a
   headline ticker - .site-ribbon clips it to one line, and
   .site-ribbon-track is the actual moving element (padding-left:100%
   starts it just off the right edge, then the keyframe slides it all
   the way to fully off the left edge before looping).
   20s covers a sentence or two at an easy reading pace - lengthen the
   duration (or shorten it) below if a given message reads too fast
   or too slow. */
.site-ribbon {
    background: var(--secondary);
    color: #3a2a00;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.6rem 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.site-ribbon-track {
    display: inline-block;
    padding-left: 100%;
    animation: site-ribbon-scroll 20s linear infinite;
}

.site-ribbon:hover .site-ribbon-track {
    animation-play-state: paused;
}

@keyframes site-ribbon-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .site-ribbon-track {
        animation: none;
        padding-left: 0;
        display: block;
        text-align: center;
    }
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0d4f6b 100%);
    padding: 80px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(246,174,45,0.2);
    color: var(--secondary);
    border: 1px solid rgba(246,174,45,0.4);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-motto {
    display: inline-block;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    color: var(--secondary);
    animation: motto-glow 2.4s ease-in-out infinite;
}

.hero-motto-dots {
    display: inline-block;
    padding: 0 0.15em;
    animation: motto-dots 2.4s ease-in-out infinite;
}

@keyframes motto-glow {
    0%, 100% {
        text-shadow: 0 0 0 rgba(246,174,45,0);
        opacity: 0.85;
    }
    50% {
        text-shadow: 0 0 14px rgba(246,174,45,0.85);
        opacity: 1;
    }
}

@keyframes motto-dots {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Respect users who've asked their OS/browser for less motion */
@media (prefers-reduced-motion: reduce) {
    .hero-motto,
    .hero-motto-dots {
        animation: none;
    }
}

.hero-illustration {
    position: relative;
    display: inline-block;
}

.duck-large {
    font-size: 8rem;
    display: block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fi {
    position: absolute;
    font-size: 1.8rem;
    animation: floatIcon 4s ease-in-out infinite;
}

.fi-1 { top: 10%; left: 5%; animation-delay: 0s; }
.fi-2 { top: 5%; right: 5%; animation-delay: 0.5s; }
.fi-3 { bottom: 20%; right: 0%; animation-delay: 1s; }
.fi-4 { bottom: 10%; left: 5%; animation-delay: 1.5s; }
.fi-5 { top: 40%; right: -5%; animation-delay: 2s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(10deg); }
}

/* ===== STATS BAR ===== */
.stats-bar {
    background: var(--primary-dark);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* ===== ABOUT SECTION ===== */
.section-tag {
    display: inline-block;
    background: rgba(46,134,171,0.1);
    color: var(--primary);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.about-image-grid {
    position: relative;
    height: 320px;
}

.about-card-big {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: var(--card-shadow);
}

.about-card-sm {
    position: absolute;
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: var(--card-shadow);
}

.top-right { top: 0; right: 40px; }
.bottom-left { bottom: 10px; left: 80px; background: linear-gradient(135deg, var(--green), #2e7d32); }

.feature-chip {
    background: #f0f9f0;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SERVICES ===== */
.services-section {
    background: var(--light-bg);
}

.service-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.service-card-featured {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.service-card-featured p {
    color: rgba(255,255,255,0.85);
}

.service-icon {
    font-size: 3rem;
}

.age-badge {
    display: inline-block;
    background: rgba(46,134,171,0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.age-badge-light {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===== WHY SECTION ===== */
.why-card {
    padding: 1.5rem;
    border-radius: var(--card-radius);
    background: white;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    transition: transform 0.3s;
}

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

.why-icon {
    font-size: 2.5rem;
}

/* ===== CTA ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d4f6b 100%);
}

.cta-box {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.75);
}

/* ===== AUTH PAGES ===== */
.auth-section {
    background: var(--light-bg);
    min-height: calc(100vh - 140px);
}

.auth-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 2.5rem 2rem 2rem;
}

.auth-card-header h3 { color: white; }
.auth-card-header .text-muted { color: rgba(255,255,255,0.7) !important; }

.auth-logo {
    font-size: 3rem;
}

.auth-card-body {
    padding: 2rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(46,134,171,0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0d4f6b);
    transform: translateY(-1px);
}

.btn-warning {
    color: white;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
}

.dash-stat-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
}

.dash-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}

.dash-stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.dash-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    overflow: hidden;
}

.dash-card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.dash-card-body {
    padding: 1.5rem;
}

/* Schedule */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
    opacity: 0.6;
}

.schedule-item.active { opacity: 1; }
.schedule-item:last-child { border-bottom: none; }

.sched-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 45px;
}

.sched-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sched-info { flex: 1; }

/* Notices */
.notice-item {
    padding: 0.9rem 1rem 0.9rem 1.2rem;
    border-bottom: 1px solid #f5f5f5;
    margin-left: 1rem;
}

.notice-item:last-child { border-bottom: none; }

/* ===== PAGE HEADER ===== */
.page-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

/* ===== CONTACT PAGE ===== */
.contact-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    height: 100%;
    transition: transform 0.2s;
}
.contact-card:hover { transform: translateY(-3px); }
.contact-icon { font-size: 2.5rem; }

/* ===== NOTICES ===== */
.notice-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    border-left: 4px solid var(--primary);
    height: 100%;
}
.notice-card-important {
    border-left-color: #dc3545;
    background: #fff8f8;
}
.notice-admin-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}
.notice-admin-item:last-child { border-bottom: none; }
.notice-important { background: #fff8f8; }
.tiny { font-size: 0.75rem; }

/* ===== CHILDREN / STAFF ===== */
.child-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    text-align: center;
    transition: transform 0.2s;
}
.child-card:hover { transform: translateY(-3px); }
.child-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.room-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.room-babyroom { background: #e8f5e9; color: #2e7d32; }
.room-toddlerroom { background: #e3f2fd; color: #1565c0; }
.room-pre-school { background: #fff3e0; color: #e65100; }

/* Profile detail rows */
.profile-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f5f5f5;
}

/* Diary */
.diary-entry-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}
.diary-entry-item:last-child { border-bottom: none; }
.mood-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.mood-happy { background: #e8f5e9; color: #2e7d32; }
.mood-great { background: #fff3e0; color: #e65100; }
.mood-tired { background: #f3e5f5; color: #6a1b9a; }
.mood-unsettled { background: #fce4ec; color: #b71c1c; }

/* ===== CALENDAR ===== */
.calendar-event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}
.calendar-event-item:last-child { border-bottom: none; }
.cal-date-box {
    min-width: 50px;
    text-align: center;
    background: var(--primary);
    border-radius: 10px;
    padding: 0.4rem;
    color: white;
}
.cal-day { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.cal-month { font-size: 0.7rem; text-transform: uppercase; }
.event-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.event-event { background: #e3f2fd; color: #1565c0; }
.event-closure { background: #fce4ec; color: #b71c1c; }
.event-trip { background: #e8f5e9; color: #2e7d32; }
.event-meeting { background: #fff3e0; color: #e65100; }

/* ===== GALLERY ===== */
.gallery-placeholder {
    background: #f0f4f8;
    border: 2px dashed #cdd8e0;
    border-radius: var(--card-radius);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 2rem;
}
.gallery-photo-tile {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f4f8;
}
.gallery-photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-photo-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 0.8rem;
    padding: 20px 10px 8px;
}

/* ===== POLICIES ===== */
.policy-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    height: 100%;
}
.policy-icon {
    font-size: 1.6rem;
    min-width: 36px;
    margin-top: 2px;
}

/* ===== FEES ===== */
.fee-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s;
}
.fee-card:hover { transform: translateY(-4px); }
.fee-card-header {
    padding: 2rem 1.5rem;
    color: white;
    text-align: center;
}
.fee-icon { font-size: 2.5rem; }
.fee-card-body { padding: 1.5rem; }
.fee-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}
.fee-price span { font-size: 1rem; font-weight: 400; color: #888; }
.fee-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fee-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.88rem;
    color: #555;
}
.fee-list li::before {
    content: "✓ ";
    color: var(--green);
    font-weight: bold;
}
#previousNotesDisplay,
#previousNotesEditor {
    text-align: left !important;
    direction: ltr !important;
}
/* Required fields - light pink */
.tab-content input[required],
.tab-content select[required],
.tab-content textarea[required] {
    background-color: #ffe4e8;
}

/* Optional fields - light green */
.tab-content input:not([required]):not([type="checkbox"]):not([disabled]),
.tab-content select:not([required]):not([disabled]),
.tab-content textarea:not([required]) {
    background-color: #e8f5e9;
}

/* ── NMS-style dashboard tiles ────────────────────────────────
   Shared between the NMS main dashboard and any sub-hub pages
   (e.g. Admin/BankHub) that reuse the same tile grid look. */
.nms-welcome {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.nms-stat {
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 20px;
    min-width: 100px;
}
.nms-stat strong { display: block; font-size: 1.6rem; color: #2c5282; line-height: 1.1; }
.nms-stat span   { font-size: 0.75rem; color: #6c757d; }
.nms-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 10px;
}
.nms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.nms-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.nms-card:hover:not(.nms-soon) {
    border-color: #2c5282;
    box-shadow: 0 2px 8px rgba(44,82,130,0.15);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}
.nms-soon { opacity: 0.5; cursor: default; pointer-events: none; }
.nms-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.nms-card-title { font-size: 0.9rem; font-weight: 600; color: #2d3748; }
.nms-card-desc  { font-size: 0.75rem; color: #a0aec0; margin-top: 3px; }
.nms-badge {
    position: absolute; top: -7px; right: -5px;
    background: #6c757d; color: #fff;
    font-size: 0.6rem; padding: 2px 6px;
    border-radius: 20px; font-weight: 700;
}

/* Cookie notice banner */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1080;
    background: #2E4057;
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.cookie-banner-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    font-size: 0.9rem;
    flex: 1 1 400px;
}
.cookie-banner-text a {
    color: #fff;
    text-decoration: underline;
}
.cookie-banner-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
/* Nested "submenu" dropdowns (Admin > Stats > Occupancy etc.) - paired with
   the click-to-toggle JS in site.js, since Bootstrap 5 has no built-in
   multi-level dropdown support. */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.25rem;
    display: none;
}
.dropdown-submenu.show > .dropdown-menu {
    display: block;
}
.dropdown-submenu.dropdown-submenu-left > .dropdown-menu {
    left: auto;
    right: 100%;
}
.dropdown-submenu > a.dropdown-toggle::after {
    transform: rotate(-90deg);
}
