/* School styles */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #068984 !important;
}

/* ================= Premium navbar ================= */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
}

.navbar-logo {
    height: 46px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(6, 137, 132, 0.25));
}

.brand-text {
    font-size: 1.25rem;
    line-height: 1.1;
    white-space: nowrap;
}

/* Language switcher (PT / EN) */
.lang-switch {
    display: inline-flex;
    background: #EFF3F4;
    border: 1px solid #D8E0E3;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    border: 0;
    background: transparent;
    color: #2C3E50;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    color: #068984;
}

.lang-btn.active {
    background: #068984;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(6, 137, 132, 0.35);
}

/* Login / Register button group */
.auth-btn-group .btn {
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    border-radius: 0;
    transition: all 0.25s ease;
}

.auth-btn-group .btn:first-child {
    border-top-left-radius: 50rem;
    border-bottom-left-radius: 50rem;
    border-right: 1px solid rgba(6, 137, 132, 0.35);
}

.auth-btn-group .btn:last-child {
    border-top-right-radius: 50rem;
    border-bottom-right-radius: 50rem;
}

.auth-btn-group .btn-outline-primary {
    border-color: #068984;
    color: #068984;
}

.auth-btn-group .btn-outline-primary:hover,
.auth-btn-group .btn-outline-primary:focus {
    background: #068984;
    border-color: #068984;
    color: #FFFFFF;
}

.auth-btn-group .btn-primary {
    background: #068984;
    border-color: #068984;
}

.auth-btn-group .btn-primary:hover,
.auth-btn-group .btn-primary:focus {
    background: #046663;
    border-color: #046663;
}

/* Flash messages stack (below fixed navbar) */
.messages-stack {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    width: min(680px, calc(100% - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.messages-stack .alert {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.18);
    font-weight: 500;
    margin: 0;
}

/* ================= School-branded page loader ================= */
body.page-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #068984 0%, #046663 50%, #057A74 100%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
    color: #FFFFFF;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.4rem;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    animation: loaderPulse 1.6s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loader-ring {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.2rem;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #FCE808;
    border-radius: 50%;
    animation: loaderSpin 0.9s linear infinite;
}

.loader-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.loader-name span {
    color: #FCE808;
}

.loader-text {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
    letter-spacing: 0.06em;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Fallback: never trap the user behind the loader if JS fails */
@media (prefers-reduced-motion: reduce) {
    .loader-logo, .loader-ring { animation: none; }
}


.navbar-brand .brand-text span {
    color: #FCE808;
}

.nav-link {
    font-weight: 500;
    color: #2C3E50 !important;
    margin-right: 1rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #068984 !important;
}

.nav-link.active {
    color: #068984 !important;
    font-weight: 600;
}

/* Navbar "Menu" dropdown (whole navigation collapsed into one dropdown) */
.navbar .nav-link.dropdown-toggle {
    background: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.navbar .dropdown-menu {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 250px;
}

.navbar .dropdown-item {
    color: #2C3E50;
    font-weight: 500;
    padding: 0.55rem 1.5rem;
    transition: color 0.3s, background-color 0.3s;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item:active {
    color: #068984 !important;
    background-color: rgba(6, 137, 132, 0.1);
}

.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Transparent section background: online school picture + brand tint overlay */
    background-color: transparent;
    background-image:
        linear-gradient(135deg, rgba(6, 137, 132, 0.78) 0%, rgba(4, 102, 99, 0.86) 50%, rgba(5, 122, 116, 0.80) 100%),
        url('https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #FFFFFF;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="20" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.8" fill="rgba(255,255,255,0.08)"/><circle cx="95" cy="80" r="1.2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-block;
    background: #FCE808;
    color: #068984;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer {
    background: #2C3E50;
    color: #FFFFFF;
    padding: 3rem 0;
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #FCE808;
}

.footer p, .footer a {
    color: #ADB5BD;
    text-decoration: none;
}

.footer a:hover {
    color: #FCE808;
}

.btn-primary-custom {
    background: #068984;
    color: #FFFFFF;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    background: #046663;
    transform: translateY(-2px);
}

.btn-accent {
    background: #FCE808;
    color: #068984;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-accent:hover {
    background: #E8C908;
    transform: translateY(-2px);
}

.social-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-float a {
    width: 55px;
    height: 55px;
    background: #068984;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(6, 137, 132, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-float a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(6, 137, 132, 0.5);
}

.social-float .whatsapp { background: #25D366; }
.social-float .whatsapp:hover { background: #128C7E; }
.social-float .facebook { background: #1877F2; }
.social-float .facebook:hover { background: #1467C9; }
.social-float .instagram { background: #E4405F; }
.social-float .instagram:hover { background: #C13564; }
.social-float .linkedin { background: #0077B5; }
.social-float .linkedin:hover { background: #005582; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
}

/* Base typography */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Ubuntu', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2C3E50;
    background-color: #F8F9FA;
    overflow-x: hidden;
}
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F8F9FA; }
::-webkit-scrollbar-thumb { background: #068984; border-radius: 5px; }

@media (max-width: 991px) {
    .navbar-collapse { background: rgba(255,255,255,0.98); padding: 1rem; border-radius: 8px; margin-top: 1rem; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
}

/* Particles canvas container (home hero) */
#particles-js { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

/* AOS helpers */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.hero-title { animation: fadeInUp 1s ease; }
.hero-subtitle { animation: fadeInUp 1.2s ease; }
.hero-badge { animation: fadeInUp 1.4s ease; }

/* Features grid (home) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); }
.feature-card .icon {
    width: 70px; height: 70px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(6, 137, 132, 0.1);
    color: #068984;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: #6C757D; margin-bottom: 0; font-size: 0.95rem; }

/* FAQ accordion */
.faq-section { background: #F8F9FA; }
.faq-item {
    background: #FFFFFF;
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.faq-item .question {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; padding: 1.25rem 1.5rem; cursor: pointer;
}
.faq-item .question h4 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.faq-item .question i { color: #068984; transition: transform 0.3s ease; }
.faq-item.active .question i { transform: rotate(180deg); }
.faq-item .answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item .answer p { padding: 0 1.5rem 1.25rem; margin: 0; color: #6C757D; }

/* About section */
.about-section { background: #F8F9FA; }
.about-content { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; }
.about-image { flex: 1 1 280px; }
.about-image img { width: 100%; border-radius: 12px; }
.about-text { flex: 2 1 420px; }
.about-text p { color: #6C757D; margin-bottom: 0.75rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-item .number { font-size: 2.4rem; font-weight: 700; color: #068984; }
.stat-item .label { color: #6C757D; font-weight: 500; }

/* Contact page */
.contact-section { background: #F8F9FA; }
.contact-content { display: flex; gap: 2rem; flex-wrap: wrap; }
.contact-info, .contact-form {
    flex: 1 1 340px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}
.contact-info h3, .contact-form h3 { margin-bottom: 1.5rem; }
.contact-detail { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.contact-detail .icon {
    width: 45px; height: 45px; flex: none;
    border-radius: 50%;
    background: rgba(6, 137, 132, 0.1);
    color: #068984;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid #DEE2E6; border-radius: 8px;
    font-size: 1rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #068984;
    box-shadow: 0 0 0 0.2rem rgba(6, 137, 132, 0.15);
}

/* Footer layout */
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.social-links a { display: inline-block; margin-bottom: 0.4rem; color: #ADB5BD; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 1.5rem; text-align: center; }
.footer-bottom p { color: #ADB5BD; margin: 0; }
.news-mini a { color: #FCE808; font-weight: 600; text-decoration: none; }
.news-mini a:hover { text-decoration: underline; }


/* ================= Premium enhancements ================= */

/* Smooth in-page scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #068984;
    outline-offset: 2px;
}

/* Section headings with brand accent underline */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
    color: #2C3E50;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #FCE808, #068984);
}

/* Buttons: unified premium treatment */
.btn {
    transition: all 0.25s ease;
}

.btn-primary-custom,
.btn-accent,
.btn-outline-primary {
    box-shadow: 0 6px 18px rgba(6, 137, 132, 0.18);
}

.btn-primary-custom:hover,
.btn-accent:hover,
.btn-outline-primary:hover {
    box-shadow: 0 10px 26px rgba(6, 137, 132, 0.28);
}

/* Cards: subtle lift on hover */
.card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* Hero content readability over the photo */
.hero::before {
    z-index: 0;
}

.hero .hero-content {
    z-index: 2;
}

.hero-title {
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

/* Navbar elevation when scrolled */
.navbar.is-scrolled {
    box-shadow: 0 6px 24px rgba(44, 62, 80, 0.14);
}

/* Back-to-top button */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 100px;
    z-index: 1050;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #068984;
    color: #FFFFFF;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(6, 137, 132, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #046663;
    transform: translateY(-3px);
}

/* About gallery grid (lightGallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-grid a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid a:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Family features icon override */
.py-5.bg-light .icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(6, 137, 132, 0.1);
    color: #068984;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
