/* ==========================================================================
   counselling.css — Psychological Counselling (SOS line + appointment booking)
   Same language as the homepage: navy hero, cyan gradient accents, Outfit
   headings, pill buttons. Classes prefixed cn- so nothing collides.
   ========================================================================== */

.counselling-page {
    background: #f4f9ff;
}

.cn-wrap {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

.cn-section {
    padding: 84px 0;
}

.cn-title {
    text-align: center;
    margin-bottom: 42px;
}

.cn-line {
    width: 80px;
    height: 4px;
    margin: 0 auto 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, #0077a8, #00dcff);
}

.cn-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.9rem, 4.2vw, 2.8rem);
    font-weight: 800;
    color: #002b45;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.cn-title p {
    color: #0077a8;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cn-grad {
    background: linear-gradient(135deg, #00dcff, #7ec8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: 50px;
    border: none;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.25s ease;
}

.cn-btn-primary {
    background: linear-gradient(135deg, #00b8ff, #0077a8);
    color: #fff;
    box-shadow: 0 15px 40px rgba(0, 150, 220, 0.35);
}

.cn-btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0, 180, 255, 0.5);
}

.cn-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.cn-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============ HERO ============ */
.cn-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 140px 0 120px;
    text-align: center;
    background:
        radial-gradient(circle at 22% 28%, rgba(0, 184, 255, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0, 220, 255, 0.14) 0%, transparent 40%),
        linear-gradient(160deg, #001420 0%, #002b45 55%, #03446d 100%);
}

.cn-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 50px;
    background: rgba(0, 200, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d4f0ff;
    margin-bottom: 22px;
}

.cn-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.3rem, 5.4vw, 4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.2px;
    margin-bottom: 18px;
    text-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.cn-hero .cn-lead {
    max-width: 64ch;
    margin: 0 auto 32px;
    font-size: 1.1rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.86);
}

.cn-hero-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.cn-assure {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 30px;
    margin-top: 38px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    list-style: none;
}

.cn-assure li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.cn-assure i {
    color: #00dcff;
}

.cn-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    line-height: 0;
}

.cn-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============ SOS BAND ============ */
.cn-sos-section {
    margin-top: -60px;
    position: relative;
    z-index: 5;
    padding-bottom: 20px;
}

.cn-sos {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 26px 36px;
    align-items: center;
    padding: 34px 40px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid rgba(0, 150, 210, 0.16);
    box-shadow: 0 26px 60px rgba(0, 60, 100, 0.13);
}

.cn-sos-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    border-radius: 30px;
    margin-bottom: 12px;
    background: #e6f7ee;
    color: #0f7a46;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cn-sos-tag .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    animation: cn-blink 2s ease-in-out infinite;
}

@keyframes cn-blink {
    50% { opacity: 0.35; }
}

.cn-sos h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #002b45;
    margin-bottom: 8px;
}

.cn-sos p {
    color: #3a4f60;
    line-height: 1.75;
    max-width: 62ch;
}

.cn-sos-number {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 22px;
    border-radius: 50px;
    background: #f0f8fd;
    border: 1px solid #cfe7f5;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    color: #002b45;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.cn-sos-number i {
    color: #00a6d6;
    font-size: 0.9em;
}

.cn-sos-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.cn-sos-actions .cn-btn {
    white-space: nowrap;
}

.cn-btn-sos {
    background: linear-gradient(135deg, #0f9d58, #0b7a43);
    color: #fff;
    font-size: 1.05rem;
    padding: 16px 34px;
    box-shadow: 0 15px 35px rgba(15, 157, 88, 0.3);
}

.cn-btn-sos:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 45px rgba(15, 157, 88, 0.42);
}

.cn-sos-note {
    text-align: center;
    font-size: 0.82rem;
    color: #5a6b7c;
}

/* Emergency notice — deliberately plain and easy to read */
.cn-emergency {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 22px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #fff6ed;
    border: 1px solid #ffd9b0;
    border-left: 5px solid #e8833a;
}

.cn-emergency i {
    color: #c2611f;
    font-size: 1.2rem;
    margin-top: 2px;
}

.cn-emergency p {
    color: #6b3b12;
    font-size: 0.95rem;
    line-height: 1.7;
}

.cn-emergency a {
    color: #a34c12;
    font-weight: 700;
}

/* ============ SUPPORT POINTS ============ */
.cn-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.cn-point {
    padding: 28px 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(0, 150, 210, 0.14);
    box-shadow: 0 12px 30px rgba(0, 60, 100, 0.06);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.cn-point:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 50px rgba(0, 110, 160, 0.15);
}

.cn-point .ico {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
    color: #005a8c;
    background: linear-gradient(145deg, #e6f4ff, #ccebff);
    transition: all 0.3s ease;
}

.cn-point:hover .ico {
    background: linear-gradient(145deg, #00a6d6, #0077a8);
    color: #fff;
    transform: rotate(-6deg) scale(1.08);
}

.cn-point h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.12rem;
    color: #002b45;
    margin-bottom: 6px;
}

.cn-point p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #5a6b7c;
}

/* ============ BOOKING ============ */
.cn-book {
    background: #eaf5fc;
}

.cn-book-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 26px;
    align-items: start;
}

.cn-card {
    background: #fff;
    border-radius: 26px;
    border: 1px solid rgba(0, 150, 210, 0.15);
    box-shadow: 0 18px 45px rgba(0, 60, 100, 0.08);
    padding: 26px 28px;
}

.cn-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: #002b45;
    margin-bottom: 18px;
}

.cn-card h3 i {
    color: #00a6d6;
}

/* ---- Calendar ---- */
.cn-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cn-month {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #002b45;
}

.cn-cal-nav {
    display: flex;
    gap: 8px;
}

.cn-cal-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d6e6f2;
    background: #f4faff;
    color: #03446d;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cn-cal-nav button:hover:not(:disabled) {
    background: #e2f1fb;
    border-color: #00b8ff;
}

.cn-cal-nav button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

table.cn-cal {
    width: 100%;
    /* fixed layout makes the 7 columns share the width evenly, so the table
       can never grow wider than the card it sits in */
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 2px;
    text-align: center;
}

table.cn-cal th {
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #5a83a3;
}

table.cn-cal td {
    padding: 0;
}

.cn-day {
    width: 100%;
    aspect-ratio: 1 / 0.86;
    min-height: 40px;
    border: none;
    border-radius: 12px;
    background: #f4faff;
    color: #1a2e44;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cn-day:hover:not(:disabled) {
    background: #d7ecfa;
}

.cn-day:disabled {
    background: transparent;
    color: #b8c9dd;
    cursor: not-allowed;
}

.cn-day.today {
    box-shadow: inset 0 0 0 2px #ffab40;
}

.cn-day.selected {
    background: linear-gradient(135deg, #00b8ff, #0077a8);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 150, 220, 0.35);
}

.cn-chiprow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 6px;
}

.cn-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 50px;
    background: #eef6fc;
    color: #03446d;
    font-size: 0.82rem;
    font-weight: 600;
}

.cn-pill i {
    color: #0077a8;
}

/* ---- Time slots ---- */
.cn-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.cn-slot {
    padding: 12px 6px;
    border-radius: 14px;
    border: 1px solid #d4e6f2;
    background: #fff;
    color: #03446d;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cn-slot:hover:not(:disabled) {
    border-color: #00b8ff;
    background: #f2fbff;
}

.cn-slot[aria-pressed="true"] {
    background: linear-gradient(135deg, #00b8ff, #0077a8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 150, 220, 0.3);
}

.cn-slot:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---- Summary ---- */
.cn-summary {
    position: sticky;
    top: 84px;
}

.cn-sum-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px dashed #dceaf4;
    font-size: 0.95rem;
    color: #3a4f60;
}

.cn-sum-row:last-of-type {
    border-bottom: none;
}

.cn-sum-row strong {
    color: #002b45;
    text-align: right;
}

.cn-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 12px;
    padding: 16px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #002b45, #03446d);
    color: #fff;
}

.cn-price span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.cn-price strong {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #7fe6ff;
}

/* ---- Form ---- */
.cn-field {
    margin-bottom: 16px;
}

.cn-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #002b45;
}

.cn-req {
    color: #c0392b;
    font-weight: 400;
}

.cn-field input,
.cn-field select,
.cn-field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 0.95rem;
    color: #1a2b3c;
    background: #f8fcff;
    border: 1px solid #cfe3f0;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cn-field input:focus,
.cn-field select:focus,
.cn-field textarea:focus {
    outline: none;
    border-color: #00b8ff;
    box-shadow: 0 0 0 3px rgba(0, 184, 255, 0.15);
}

.cn-field textarea {
    min-height: 88px;
    resize: vertical;
}

.cn-field .err {
    display: none;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c0392b;
}

.cn-field.invalid input,
.cn-field.invalid select {
    border-color: #e57373;
    background: #fff7f7;
}

.cn-field.invalid .err {
    display: block;
}

.cn-phone {
    display: flex;
    gap: 10px;
}

.cn-phone select {
    width: 128px;
    flex: 0 0 128px;
}

.cn-phone input {
    flex: 1;
    min-width: 0;
}

.cn-pay {
    width: 100%;
    margin-top: 6px;
    font-size: 1.05rem;
    padding: 16px 28px;
}

.cn-pay:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.cn-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    background: #f0f8fd;
    border-left: 4px solid #00a6d6;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #3a4f60;
}

.cn-note i {
    color: #0077a8;
    margin-top: 3px;
}

.cn-spin {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cn-spin 0.9s linear infinite;
}

@keyframes cn-spin {
    to { transform: rotate(360deg); }
}

/* ---- Toast ---- */
.cn-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 2000;
    transform: translate(-50%, 130%);
    max-width: min(420px, calc(100% - 32px));
    padding: 15px 22px;
    border-radius: 16px;
    background: #03446d;
    color: #fff;
    font-size: 0.93rem;
    line-height: 1.5;
    box-shadow: 0 20px 45px rgba(0, 20, 40, 0.35);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
}

.cn-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.cn-toast.success { background: #0f7a46; }
.cn-toast.error   { background: #b23a3a; }

/* ---- Success panel, shown after a booking ---- */
.cn-done {
    display: none;
    text-align: center;
    padding: 34px 28px;
}

.cn-done.show {
    display: block;
}

.cn-done .tick {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #fff;
    background: linear-gradient(135deg, #0f9d58, #0b7a43);
    box-shadow: 0 14px 30px rgba(15, 157, 88, 0.35);
}

.cn-done h3 {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: #002b45;
    margin-bottom: 10px;
}

.cn-done p {
    color: #3a4f60;
    line-height: 1.8;
    margin-bottom: 8px;
}

.cn-ref {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 18px;
    border-radius: 40px;
    background: #f0f8fd;
    border: 1px solid #cfe7f5;
    font-weight: 700;
    color: #002b45;
}

/* ============ FAQ ============ */
.cn-faq {
    max-width: 860px;
    margin-inline: auto;
}

.cn-q {
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(0, 150, 210, 0.15);
    background: #fff;
    overflow: hidden;
}

.cn-q summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    font-weight: 700;
    color: #002b45;
    cursor: pointer;
    list-style: none;
}

.cn-q summary::-webkit-details-marker {
    display: none;
}

.cn-q summary::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: #0077a8;
    transition: transform 0.25s ease;
}

.cn-q[open] summary::after {
    transform: rotate(180deg);
}

.cn-q p {
    padding: 0 22px 20px;
    color: #3a4f60;
    line-height: 1.8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
    .cn-book-grid {
        grid-template-columns: 1fr;
    }

    .cn-summary {
        position: static;
    }

    .cn-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cn-sos {
        grid-template-columns: 1fr;
    }

    .cn-sos-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cn-sos-actions .cn-btn {
        flex: 1 1 200px;
    }

    .cn-sos-note {
        flex-basis: 100%;
    }
}

@media (max-width: 760px) {
    .cn-section {
        padding: 56px 0;
    }

    .cn-hero {
        padding: 118px 0 96px;
    }

    .cn-sos {
        padding: 26px 22px;
        border-radius: 24px;
    }

    .cn-card {
        padding: 22px 18px;
    }

    .cn-slots {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    }
}

@media (max-width: 480px) {
    .cn-points {
        grid-template-columns: 1fr;
    }

    .cn-hero-btns .cn-btn,
    .cn-sos-actions .cn-btn {
        flex: 1 1 100%;
    }

    /* iOS zooms into fields smaller than 16px */
    .cn-field input,
    .cn-field select,
    .cn-field textarea {
        font-size: 16px;
    }

    .cn-phone select {
        width: 104px;
        flex-basis: 104px;
    }
}

@media (hover: none) {
    .cn-point:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cn-sos-tag .dot {
        animation: none;
    }
}
