@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800&display=swap');

:root {
    --primary-green: #2d6a4f;
    --accent-green: #40916c;
    --light-green: #d8f3dc;
    --sunny-yellow: #f9c74f;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-color: #fdfcf8;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
}

.footer { background-color: var(--white); padding: 40px 20px; text-align: center; border-top: 1px solid #eee; margin-top: auto; }
.footer-links { margin-bottom: 15px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--primary-green); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-green); text-decoration: underline; }
.footer-copy { color: var(--text-light); font-size: 0.85rem; }

app-footer {
    display: block;
    margin-top: auto;
    width: 100%;
}

/* The page gradient lives on a fixed layer behind everything instead of `background-attachment: fixed`,
   which iOS Safari ignores and which left long pages white below the first screen in full-page captures. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #fffcf9 0%, #ffecd2 50%, #fcb69f 100%);
    pointer-events: none;
}

body {
    background-color: #ffecd2;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-green);
}

@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .logo-text { display: none; }
    .nav-links { gap: 15px; justify-content: flex-end; }
    .nav-links a { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .navbar { flex-direction: column; gap: 15px; }
    .nav-links { justify-content: center; }
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.card-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    border-top: 5px solid var(--sunny-yellow);
    margin-bottom: 20px;
}

.step-header {
    font-size: 1.1rem;
    color: var(--primary-green);
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-top: 25px;
    margin-bottom: 15px;
}

h2, h3 {
    margin-bottom: 15px;
    color: var(--primary-green);
}

input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="date"], input[type="number"],
input[type="url"], input[type="datetime-local"], select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border 0.3s ease;
}

input[type="datetime-local"] {
    appearance: none;
    -webkit-appearance: none;
    color: var(--text-dark);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-green);
    background-color: var(--white);
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.radio-group label {
    flex: 1;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    border: 2px solid transparent;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group input[type="radio"]:checked + span {
    color: var(--primary-green);
}

.radio-label.selected {
    border-color: var(--primary-green);
    background: var(--light-green);
}

button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-green);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

button:hover { background-color: var(--accent-green); }
button:active { transform: scale(0.98); }

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .split-layout { grid-template-columns: 1fr; }
}

.med-card {
    background: linear-gradient(135deg, var(--light-green), #e0f8e5);
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.med-card::before {
    content: '☀️';
    font-size: 80px;
    opacity: 0.1;
    position: absolute;
    top: -20px;
    right: -20px;
}

.download-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--sunny-yellow);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 800;
    border-radius: 8px;
}

.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}
.faq-question {
    font-weight: 800;
    color: var(--primary-green);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}
.faq-answer {
    margin-top: 10px;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.7;
    display: none;
    background: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--sunny-yellow);
}

.price-display {
    background: #f8f9fa;
    border: 1px dashed #ccc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-row {
    font-weight: 800;
    color: var(--primary-green);
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-top: 8px;
}

.coupon-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.coupon-group input { margin-bottom: 0; }
.coupon-group button { width: auto; white-space: nowrap; padding: 0 20px; background: var(--text-dark); }

.doctor-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 6px;
}

.btn-danger {
    background-color: #d90429;
    width: auto;
    padding: 8px 15px;
    font-size: 0.9rem;
}
.btn-danger:hover { background-color: #bf0424; }


#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 250px;
    padding: 16px 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary-green);
    color: var(--text-dark);
    font-weight: 600;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left-color: #d90429;
}

.toast.success {
    border-left-color: var(--accent-green);
}

.toast.info {
    border-left-color: var(--sunny-yellow);
}

.calendar-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.8);
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 800;
    color: var(--primary-green);
}
.calendar-header button {
    width: auto;
    padding: 5px 15px;
    font-size: 0.9rem;
    background: var(--text-dark);
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}
.cal-day-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-light);
    padding-bottom: 5px;
}
.cal-day {
    padding: 10px 0;
    background: var(--white);
    border-radius: 6px;
    cursor: not-allowed;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    user-select: none;
    opacity: 0.4;
}
.cal-day.available {
    cursor: pointer;
    opacity: 1;
    font-weight: 600;
    color: var(--primary-green);
    border: 1px solid var(--accent-green);
}
.cal-day.available:hover {
    background: var(--light-green);
}
.cal-day.selected {
    background: var(--primary-green);
    color: var(--white);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(45, 106, 79, 0.3);
}
.cal-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
    z-index: 9999; backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content {
    background: #fff; padding: 35px; border-radius: 12px; max-width: 400px; width: 90%;
    text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transform: translateY(20px); transition: all 0.3s ease;
}
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-title { color: #d90429; margin-bottom: 15px; font-size: 1.5rem; }
.modal-text { color: var(--text-dark); margin-bottom: 25px; line-height: 1.5; }
.modal-actions { display: flex; gap: 15px; justify-content: center; }
.modal-btn-cancel { background: #eee; color: #333; width: auto; padding: 10px 20px; }
.modal-btn-confirm { background: #d90429; color: white; width: auto; padding: 10px 20px; }

.admin-nav { display: flex; gap: 15px; margin-bottom: 20px; justify-content: center;}
.admin-nav button { padding: 10px 20px; background: #eee; color: #333; width: auto; border:none; cursor: pointer; border-radius: 4px; font-weight: bold;}
.admin-nav button.active { background: var(--primary-green); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

#availabilitySection .cal-day { opacity: 1; cursor: pointer; }
#availabilitySection .cal-day:hover { background: var(--light-green); }
.cal-day.has-availability { background-color: var(--sunny-yellow) !important; color: var(--text-dark) !important; font-weight: 800; border: 1px solid #e0b03b !important; }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin: 15px 0; max-height: 200px; overflow-y: auto; padding: 15px; background: rgba(255,255,255,0.7); border: 1px solid #ddd; border-radius: 8px; }
.time-slot { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; background: #fff; padding: 5px; border-radius: 4px; border: 1px solid #eee; }
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
textarea.setting-input { width: 100%; height: 100px; font-family: monospace; padding: 10px; border-radius: 6px; border: 1px solid #ccc; margin-bottom: 10px;}
input.setting-input { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #ccc; margin-bottom: 10px; }

.checkbox-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px;
    width: 100%;
}

.checkbox-container input[type="checkbox"] {
    width: auto !important;
    min-width: 18px;
    height: 18px;
    margin: 4px 0 0 0 !important;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .container { margin: 20px auto; padding: 0 15px; }
    .card-container { padding: 20px; border-width: 3px; margin-bottom: 15px; }

    .dash-nav, .admin-nav { flex-direction: column; gap: 10px; width: 100%; }
    .dash-nav button, .admin-nav button { width: 100% !important; margin: 0 !important; }

    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    form div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
    form div[style*="display: flex"] input,
    form div[style*="display: flex"] button,
    form div[style*="display: flex"] select {
        width: 100% !important;
        margin: 0 !important;
    }

    .coupon-group { flex-direction: column; }
    .coupon-group button { width: 100% !important; padding: 12px !important; }

    .calendar-header { flex-direction: column; gap: 15px; text-align: center; padding: 15px !important; }
    .calendar-header .month-nav { flex-direction: row !important; justify-content: space-between; width: 100%; gap: 5px !important; }
    .calendar-header .month-nav button { width: auto !important; padding: 8px 15px !important; margin: 0 !important; }
    #monthYearDisplay { margin: 0; min-width: auto !important; font-size: 1.1rem !important; }
    .cal-day { padding: 8px 0; font-size: 0.9rem; }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    .step-header { font-size: 1.05rem; }

    .doctor-list-item, .appt-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .doctor-list-item > div:last-child { width: 100%; display: flex; flex-direction: column; gap: 10px; }
    .doctor-list-item button { width: 100% !important; margin: 0 !important; }

    .desktop-divider { display: none; }
    .calendar-header #calendarActions { width: 100%; }
    .calendar-header #calendarActions button { width: 100% !important; margin: 0 !important; }

    .time-grid { grid-template-columns: 1fr 1fr; }
    .checkbox-container {
        flex-direction: row !important;
    }
}
/* ---- Blog article body (/education/:slug) ----
   Minimal rules for the classes Quill writes (kept by the server's blog sanitizer); the full Quill
   theme is only loaded in the admin editor. */
.edu-article .body .ql-align-center { text-align: center; }
.edu-article .body .ql-align-right { text-align: right; }
.edu-article .body .ql-align-justify { text-align: justify; }
.edu-article .body .ql-direction-rtl { direction: rtl; text-align: inherit; }
.edu-article .body .ql-indent-1 { padding-left: 3em; }
.edu-article .body .ql-indent-2 { padding-left: 6em; }
.edu-article .body .ql-indent-3 { padding-left: 9em; }
.edu-article .body .ql-indent-4 { padding-left: 12em; }
.edu-article .body .ql-indent-5 { padding-left: 15em; }
.edu-article .body .ql-indent-6 { padding-left: 18em; }
.edu-article .body .ql-indent-7 { padding-left: 21em; }
.edu-article .body .ql-indent-8 { padding-left: 24em; }
.edu-article .body ul, .edu-article .body ol { padding-left: 1.5em; margin: 0 0 1em; }
.edu-article .body ul { list-style: disc; }
.edu-article .body ol { list-style: decimal; }
.edu-article .body ul ul, .edu-article .body ol ul { list-style: circle; margin-bottom: 0; }
.edu-article .body ol ol, .edu-article .body ul ol { list-style: lower-alpha; margin-bottom: 0; }
.edu-article .body blockquote { border-left: 4px solid #ccc; margin: 1em 0; padding-left: 16px; color: #555; }
.edu-article .body pre { background: #f4f4f4; border-radius: 4px; padding: 10px 14px; overflow-x: auto; white-space: pre-wrap; }
.edu-article .body video { display: block; max-width: 100%; height: auto; margin: 1em 0; }
.edu-article .body iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; margin: 1em 0; }
