/* ============================================================
   Alice Overseas — theme overrides
   Primary brand color: rgb(79, 114, 112) (muted teal-green)
   Plus a small set of premium animations.
   ============================================================ */

:root {
    --ao-primary:        rgb(79, 114, 112);
    --ao-primary-dark:   rgb(58, 89, 87);
    --ao-primary-light:  rgb(112, 145, 143);
    --ao-primary-rgb:    79, 114, 112;
    --ao-accent:         rgb(212, 175, 55);   /* soft gold for hover/CTA accents */
    --bs-primary:        rgb(79, 114, 112);
    --bs-primary-rgb:    79, 114, 112;
}

/* --- Bootstrap colour overrides --- */
.bg-primary               { background-color: var(--ao-primary) !important; }
.text-primary             { color: var(--ao-primary) !important; }
.border-primary           { border-color: var(--ao-primary) !important; }
.btn-primary {
    background-color: var(--ao-primary) !important;
    border-color: var(--ao-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ao-primary-dark) !important;
    border-color: var(--ao-primary-dark) !important;
}
.btn-outline-primary {
    color: var(--ao-primary) !important;
    border-color: var(--ao-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--ao-primary) !important;
    color: #fff !important;
}
.btn-outline-light:hover  { color: var(--ao-primary) !important; }
.badge.bg-light.text-primary { color: var(--ao-primary) !important; }
a                         { color: var(--ao-primary); }
a:hover                   { color: var(--ao-primary-dark); }

/* The legacy theme uses these helpers heavily */
.card-btn                 { color: var(--ao-primary); }
.card-btn:hover           { color: var(--ao-primary-dark); }

/* --- Bootstrap component overrides (Bootstrap 5 bakes #0d6efd into many
   compiled rules, so changing --bs-primary alone isn't enough) --- */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--ao-primary) !important;
    color: #fff !important;
}
.nav-pills .nav-link               { color: var(--ao-primary); }
.nav-pills .nav-link:hover         { color: var(--ao-primary-dark); }

/* Nav tabs (the variant on /study-abroad) */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--ao-primary);
    border-color: rgba(var(--ao-primary-rgb), .25) rgba(var(--ao-primary-rgb), .25) #fff;
}
.nav-tabs .nav-link:hover { border-color: rgba(var(--ao-primary-rgb), .2); }

/* The list-group-item style used as left-nav on /courses-abroad */
.list-group-item.active {
    background-color: var(--ao-primary) !important;
    border-color: var(--ao-primary) !important;
    color: #fff !important;
}
.list-group-item-action:hover,
.list-group-item-action:focus { color: var(--ao-primary); }
#courses-lists .list-group-item.nav-link.active,
#courses-lists .nav-link.active {
    background-color: var(--ao-primary) !important;
    border-color: var(--ao-primary) !important;
    color: #fff !important;
}
#courses-lists .nav-link        { color: var(--ao-primary); }
#courses-lists .nav-link:hover  { color: var(--ao-primary-dark); }

/* Pagination */
.page-link        { color: var(--ao-primary); }
.page-link:hover  { color: var(--ao-primary-dark); }
.page-link:focus  { box-shadow: 0 0 0 .25rem rgba(var(--ao-primary-rgb), .25); }
.page-item.active .page-link {
    background-color: var(--ao-primary);
    border-color: var(--ao-primary);
    color: #fff;
}

/* Form controls focus rings */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--ao-primary-light) !important;
    box-shadow: 0 0 0 .25rem rgba(var(--ao-primary-rgb), .2) !important;
}
.form-check-input:checked {
    background-color: var(--ao-primary) !important;
    border-color: var(--ao-primary) !important;
}

/* Links */
.btn-link, .link-primary { color: var(--ao-primary) !important; }
.btn-link:hover, .link-primary:hover { color: var(--ao-primary-dark) !important; }

/* Dropdowns */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--ao-primary) !important;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    color: var(--ao-primary);
    background-color: rgba(var(--ao-primary-rgb), .08);
    box-shadow: inset 0 -1px 0 rgba(var(--ao-primary-rgb), .15);
}
.accordion-button:focus {
    border-color: var(--ao-primary-light);
    box-shadow: 0 0 0 .25rem rgba(var(--ao-primary-rgb), .2);
}

/* Alerts */
.alert-primary {
    color: var(--ao-primary-dark);
    background-color: rgba(var(--ao-primary-rgb), .08);
    border-color: rgba(var(--ao-primary-rgb), .2);
}

/* Badges + utility classes */
.badge.bg-primary,
.text-bg-primary { background-color: var(--ao-primary) !important; color: #fff !important; }

/* Spinner */
.spinner-border.text-primary,
.spinner-grow.text-primary { color: var(--ao-primary) !important; }

/* Progress bar */
.progress-bar { background-color: var(--ao-primary); }

/* Form switch / range thumb */
.form-range::-webkit-slider-thumb { background-color: var(--ao-primary); }
.form-range::-moz-range-thumb     { background-color: var(--ao-primary); }
.form-switch .form-check-input:checked {
    background-color: var(--ao-primary);
    border-color: var(--ao-primary);
}

/* Generic ".active" pill state used by the study-abroad nav-pills variant */
.nav.nav-pills .nav-link.active span,
.nav-pills .nav-link.active span { color: #fff !important; }

/* Section headers, watertext etc */
.section-header .section-title { color: inherit; }
.cta-section { background-color: var(--ao-primary) !important; }

/* Footer link hover accent */
.ao-footer a:hover        { color: var(--ao-accent); }
.ao-footer .ao-social a:hover { background: var(--ao-primary-light); color: #fff; }
.ao-footer .ao-contact-row svg { color: var(--ao-primary-light); }
.ao-footer .ao-newsletter input:focus { border-color: var(--ao-primary-light); }


/* ============================================================
   Premium-feel animations
   ============================================================ */

/* Reveal-on-scroll. Toggled by ao-theme.js via IntersectionObserver. */
[data-ao-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.22,.61,.36,1),
                transform .8s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
[data-ao-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-ao-reveal="left"]   { transform: translateX(-32px); }
[data-ao-reveal="right"]  { transform: translateX(32px); }
[data-ao-reveal="left"].is-visible,
[data-ao-reveal="right"].is-visible { transform: translateX(0); }

/* Staggered children */
[data-ao-stagger] > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-ao-stagger].is-visible > * { opacity: 1; transform: translateY(0); }
[data-ao-stagger].is-visible > *:nth-child(1) { transition-delay: .05s; }
[data-ao-stagger].is-visible > *:nth-child(2) { transition-delay: .12s; }
[data-ao-stagger].is-visible > *:nth-child(3) { transition-delay: .19s; }
[data-ao-stagger].is-visible > *:nth-child(4) { transition-delay: .26s; }
[data-ao-stagger].is-visible > *:nth-child(5) { transition-delay: .33s; }
[data-ao-stagger].is-visible > *:nth-child(6) { transition-delay: .40s; }
[data-ao-stagger].is-visible > *:nth-child(n+7) { transition-delay: .45s; }

/* Hero entrance */
.page-title .section-header,
.hero-section .section-header {
    animation: aoFadeUp 1s cubic-bezier(.22,.61,.36,1) both;
}
.page-title .bg-shape svg { animation: aoSlideIn 1.2s ease both; }

@keyframes aoFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes aoSlideIn {
    from { opacity: 0; transform: translateY(40px) scale(1.02); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Card hover lift */
.card.study-card,
.card.card-hover {
    transition: transform .35s ease, box-shadow .35s ease;
}
.card.study-card:hover,
.card.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px -10px rgba(0,0,0,.18);
}

/* Card image zoom on hover */
.card .card-img img,
.study-card .card-img img,
.card-img.overflow-hidden img {
    transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.card:hover .card-img img,
.study-card:hover .card-img img {
    transform: scale(1.06);
}

/* CTA button glow */
.btn-primary, .btn-outline-light, .btn-outline-primary {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, background-color .2s, color .2s, border-color .2s;
}
.btn-primary:hover, .btn-outline-light:hover, .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -8px rgba(var(--ao-primary-rgb), .55);
}

/* WhatsApp floating button pulse */
.whatsapp-fix {
    animation: aoPulse 2.4s ease-in-out infinite;
}
@keyframes aoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
    50%      { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* Nav link underline on hover (desktop) */
@media (min-width: 992px) {
    header .nav-link {
        position: relative;
    }
    header .nav-link::after {
        content: "";
        position: absolute;
        left: 50%;
        right: 50%;
        bottom: 4px;
        height: 2px;
        background: var(--ao-primary);
        transition: left .25s ease, right .25s ease;
    }
    header .nav-link:hover::after {
        left: 20%;
        right: 20%;
    }
}

/* ============================================================
   Responsive polish (mobile-first touches across the site)
   ============================================================ */
html, body { overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
.btn { white-space: normal; }   /* allow long button labels to wrap on small screens */

/* Hero text sizing */
@media (max-width: 767.98px) {
    .page-title, .hero-section { padding-top: 100px; padding-bottom: 80px; }
    .page-title .section-title,
    .hero-section .section-title { font-size: 1.75rem !important; line-height: 1.2; }
    .page-title .watertext,
    .hero-section .watertext { font-size: 2.25rem !important; }
    .section-gap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .cta-section { padding: 2.5rem 0; }
    .cta-section .section-title { font-size: 1.5rem !important; }
}
@media (max-width: 575.98px) {
    .page-title .section-title,
    .hero-section .section-title { font-size: 1.45rem !important; }
    .cta-text { font-size: .95rem; }
    .btn-outline-light, .btn-outline-primary, .btn-primary { font-size: .95rem; padding: .6rem 1.25rem; }
}

/* Footer stacks evenly on small screens */
@media (max-width: 767.98px) {
    .ao-footer { padding-top: 40px; margin-top: 40px; text-align: center; }
    .ao-footer .brand-block .ao-logo { margin-left: auto; margin-right: auto; display: block; }
    .ao-footer .ao-contact-row { justify-content: center; text-align: left; }
    .ao-footer .ao-social { justify-content: center; }
    .ao-footer h5 { margin-top: 1rem; }
    .ao-footer-bottom .col-md-6 { text-align: center !important; }
}

/* Card text doesn't overflow on tiny screens */
.card-text { word-break: break-word; }

/* Country grid cards on phone get a slightly tighter image height */
@media (max-width: 575.98px) {
    .study-card .card-img { max-height: 180px; }
}

/* Whatsapp floating button — keep clear of bottom on small screens */
@media (max-width: 575.98px) {
    .whatsapp-fix { right: 16px !important; bottom: 80px !important; }
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
    [data-ao-reveal], [data-ao-stagger] > * { opacity: 1 !important; transform: none !important; }
}
