/* --- GLOBAIS E VARIÁVEIS --- */
:root {
    --sand-bg: #FAF3E3;
    --ocean-blue: #005A9C;
    --coral-accent: #FF6B6B;
    --dark-text: #333333;
    --font-title: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
    /* Variáveis de sombra para reutilização */
    --shadow-light: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--sand-bg); color: var(--dark-text); }

/* --- MANUTENÇÃO: LARGURA MÁXIMA DO CONTEÚDO GLOBAL --- */
.container { 
    max-width: 1300px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* --- CABEÇALHO --- */
.main-header { 
    background-color: #fff; 
    padding: 1rem 0; 
    position: relative;
    box-shadow: var(--shadow-light);
    z-index: 1000;
}
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-title); font-size: 1.8rem; font-weight: 700; color: var(--ocean-blue); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; width: auto; }
.header-controls { display: flex; align-items: center; gap: 1.5rem; }

/* --- NAVEGAÇÃO --- */
.main-nav { order: 1; }
.main-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.main-nav a { text-decoration: none; color: var(--dark-text); font-weight: 700; position: relative; padding-bottom: 5px; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--coral-accent); transition: width 0.3s ease; }
.main-nav a:hover::after, .main-nav .current-page a::after { width: 100%; }
.mobile-menu-toggle { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.mobile-menu-toggle span { width: 30px; height: 3px; background-color: var(--ocean-blue); border-radius: 10px; transition: all 0.3s ease-in-out; }
.mobile-menu-toggle.is-active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.mobile-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* --- CONTEÚDO PRINCIPAL --- */
main {
    position: relative;
    z-index: 5;
}
.hero-section { 
    padding: 4rem 0; 
    position: relative; 
    overflow: visible; 
    background-color: var(--sand-bg);
    /* Regras para a imagem de fundo principal */
    background-image: url('/img/homebg.png');
    background-size: cover;
    background-position: center center;
}
.hero-layout { display: flex; align-items: center; gap: 2rem; }
.hero-text { flex: 1; position: relative; z-index: 2; order: 1; }
.carousel-container {
    flex: 1;
    position: relative;
    border-radius: 30px;
    box-shadow: 0 15px 30px rgba(0, 90, 156, 0.15);
    z-index: 2;
    overflow: hidden; 
    order: 2;
}
.hero-text h1 { font-family: var(--font-title); font-size: 2.8rem; color: var(--ocean-blue); line-height: 1.2; }
.hero-text h2 { font-family: var(--font-body); font-size: 1.3rem; margin-top: 0.5rem; font-weight: 400; color: #555; }
.hero-text p { font-size: 1.1rem; line-height: 1.6; margin: 1.5rem 0; }
.cta-button { display: inline-block; background-color: var(--coral-accent); color: #fff; padding: 12px 25px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: background-color 0.3s, transform 0.3s; }
.cta-button:hover { background-color: #e65a5a; transform: translateY(-3px); }

/* --- ESTILOS DO CARROSSEL (FADE) --- */
.carousel-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; 
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active {
    opacity: 1;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--sand-bg);
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 24px;
    z-index: 10;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.carousel-container:hover .carousel-btn {
    opacity: 1;
}
.prev-btn {
    left: 10px;
}
.next-btn {
    right: 10px;
}

/* --- SEÇÃO DE DESTAQUES --- */
.highlights-section { 
    background-color: #fff; 
    padding: 5rem 0; 
    position: relative; 
    overflow: hidden; 
}
.highlights-section .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; z-index: 1; }
.highlight-box { text-align: center; padding: 2.5rem 2rem; border-radius: 15px; background-size: cover; background-position: center; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.3s, box-shadow 0.3s; }
.highlight-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(250, 243, 227, 0.85); z-index: 0; }
.highlight-box > * { position: relative; z-index: 1; }
.highlight-box:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.box-english { background-image: url('img/study.jpg'); }
.box-omotenashi { background-image: url('img/respect.jpg'); }
.box-sports { background-image: url('img/sports.jpg'); }
.icon-container { width: 90px; height: 90px; background-color: #fff; border-radius: 50%; margin: 0 auto 1.5rem auto; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0, 90, 156, 0.1); padding: 20px; }
.icon-container img { max-width: 100%; max-height: 100%; height: auto; width: auto; object-fit: contain; }
.highlight-box h3 { font-family: var(--font-title); font-size: 1.4rem; color: var(--ocean-blue); margin-bottom: 0.5rem; }
.box-button { display: inline-block; margin-top: 1.5rem; padding: 8px 20px; background-color: transparent; border: 2px solid var(--coral-accent); color: var(--coral-accent); border-radius: 50px; text-decoration: none; font-weight: 700; transition: all 0.3s ease; align-self: center; }
.box-button:hover { background-color: var(--coral-accent); color: #fff; }

/* --- SEÇÃO DE MÍDIA (VÍDEO E CALENDÁRIO/BLOG) --- */
.media-section,
.social-blog-section {
    background-color: var(--sand-bg);
    padding: 4rem 0;
}
.media-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* --- MANUTENÇÃO: LARGURAS AMPLAS PARA VÍDEO E CALENDÁRIO --- */
.media-video { /* LADO ESQUERDO/MAIOR (Vídeo ou Redes Sociais) */
    flex: 1; 
    max-width: 650px;
}

.media-calendar { /* LADO DIREITO/MENOR (Calendário ou Blog) */
    max-width: 600px;
    flex-shrink: 0; 
    flex-grow: 1;
}
/* ----------------------------------------------------------- */

.media-section h2,
.social-blog-section h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--ocean-blue);
    margin-bottom: 1.5rem;
}
.video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 56.25%; 
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.event-list {
    list-style: none;
}

/*
 * --- CORREÇÃO CRÍTICA DO CALENDÁRIO ---
 * 1. O LI AGORA SÓ SERVE COMO CONTAINER DE MARGEM.
 * 2. O LINK (.event-link-wrapper) AGORA TEM O ESTILO VISUAL, HOVER, SOMBRA E LAYOUT FLEX.
 */

.event-list li {
    display: block; 
    background-color: transparent;
    padding: 0; 
    border-radius: 0;
    margin-bottom: 1rem;
    box-shadow: none;
    transition: none;
    position: relative;
    overflow: visible;
    min-height: 90px;
}

.event-list li:hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

.event-link-wrapper {
    display: flex;
    align-items: center; 
    gap: 1rem; 
    padding: 20px 1rem; 
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.event-list li:hover .event-link-wrapper {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.event-date {
    background-color: var(--coral-accent);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    margin-right: 0; 
    font-weight: 700;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    min-width: 70px;
}
.event-date span {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}
.event-details {
    position: relative;
    z-index: 1;
    flex-grow: 1;
}
.event-details h3 {
    font-size: 1.2rem;
    color: var(--dark-text);
    margin-bottom: 0.25rem;
}
.event-details p {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0;
}
/* --- FIM DA CORREÇÃO CRÍTICA DO CALENDÁRIO --- */


/* --- ESTILOS PARA REDES SOCIAIS (SOCIAL ICONS) --- */
.social-icons-wrapper {
    text-align: center; 
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    margin-bottom: 30px;
}
.social-icon img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s;
}
.social-icon img:hover {
    transform: scale(1.1);
}

/* --- PÁGINAS INTERNAS (Geral) --- */
.page-content { background-color: var(--sand-bg); }

/* Estilo Base para o Banner (quando tem imagem de fundo) */
.page-banner { 
    padding: 4rem 0; 
    background-size: cover; 
    background-position: center; 
    text-align: center; 
    color: white; 
    position: relative;
}
.page-banner h1 { font-family: var(--font-title); font-size: 3rem; margin: 0; text-shadow: 2px 2px 6px rgba(0,0,0,0.7); }
.page-banner p { font-size: 1.2rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.7); }

/* ESTILO ESPECÍFICO PARA O BANNER DO BLOG (Sand/Floral) */
.page-banner.banner-with-separator {
    background-color: var(--sand-bg) !important; 
    background-image: none !important;
    padding-bottom: 4rem; 
    color: var(--ocean-blue);
    overflow: visible; 
}
.page-banner.banner-with-separator h1, .page-banner.banner-with-separator p {
    color: var(--ocean-blue); 
    text-shadow: none; 
}
.page-banner.banner-with-separator h1 {
    font-size: 3rem; 
    margin-bottom: 0.5rem;
}


.generic-content { padding: 4rem 0; }
.generic-content .container {
    background-color: #fff;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
}
.generic-content h2 { font-family: var(--font-title); font-size: 2.5rem; color: var(--ocean-blue); text-align: center; margin-bottom: 2rem; }
.generic-content p { line-height: 1.8; margin-bottom: 1rem; text-align: center; }
.generic-content .cta-button { margin: 2rem auto 0 auto; display: table; }

/* --- DECORAÇÕES FLORAIS --- */
/* Estilo do Separador com imagem floral.png (Aplicado ao .banner-with-separator) */
.banner-with-separator::after {
    content: '';
    display: block;
    width: 100%;
    height: 100px;
    background-image: url('img/floral.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    position: absolute;
    bottom: -50px;
    left: 0;
    z-index: 10;
}
/* DIVISOR FLORAL */
.floral-divider {
    background-image: url('img/floral.png');
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 60px; 
    height: 60px;
    width: 100%;
    margin: 0; 
    position: relative;
    z-index: 6;
}

.floral-decoration-top { 
    position: absolute; 
    top: -40px; 
    right: -60px; 
    width: 250px; 
    opacity: 0.2; 
    transform: rotate(15deg); 
    z-index: 1; 
    transition: all 0.3s ease; 
}
/* NOVO ESTILO: Garante que o H1 e o P no banner tenham a cor Ocean Blue */
.page-banner.sand-bg-style h1, 
.page-banner.sand-bg-style p {
    color: var(--ocean-blue) !important;
}

.floral-decoration-bottom { position: absolute; bottom: -20px; left: -30px; width: 200px; opacity: 0.3; z-index: 0; transition: all 0.3s ease; }

/* --- RODAPÉ E CONTROLES --- */
.main-footer { background-color: var(--ocean-blue); color: #fff; text-align: center; padding: 2rem 0; position: relative; z-index: 10; }
.language-switcher select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-color: transparent; border: 1px solid #ccc; border-radius: 50px; padding: 8px 30px 8px 12px; font-family: var(--font-body); font-weight: 700; color: var(--dark-text); cursor: pointer; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 8px center; background-size: 1.2em; }
.admin-login { margin-top: 1rem; }
.admin-login a { color: #fff; font-size: 0.8rem; text-decoration: none; opacity: 0.7; transition: opacity 0.3s; }
.admin-login a:hover { opacity: 1; }

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 950px) {
    body {
        overflow-x: hidden;
    }
    .header-container { flex-wrap: wrap; }
    .logo { order: 1; }
    .header-controls { order: 2; }
    .main-nav { 
        order: 3; 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background-color: #fff; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    }
    .main-nav.nav-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav ul li a { display: block; padding: 1rem 1.5rem; border-bottom: 1px solid #f0f0f0; }
    .main-nav a:hover::after { width: 0; }
    .mobile-menu-toggle { display: flex; }
    .hero-layout { 
        display: block; 
        text-align: center; 
    }
    .carousel-container {
        width: 100%; 
        margin: 0 0 2rem 0;
    }
    .highlights-section .container { grid-template-columns: 1fr; }
    .media-layout { flex-direction: column; }
    
    .media-video,
    .media-calendar,
    .social-icons-wrapper,
    .latest-blog-updates {
        width: 100%;
        max-width: 100%; 
        margin-bottom: 2rem;
    }
    .media-video h2,
    .media-calendar h2,
    .social-icons-wrapper h2,
    .latest-blog-updates h2 {
        padding: 0 20px;
    }
    .media-layout {
        padding: 0;
    }
    
    .floral-decoration-top { 
        width: 40vw; 
        top: -5vw; 
        right: 0; 
        transform: rotate(0deg);
        opacity: 0.15; 
    }
    .floral-decoration-bottom { width: 35vw; bottom: -5vw; left: -8vw; opacity: 0.2; }

    .banner-with-separator::after {
        background-size: contain;
        height: 60px;
        bottom: -30px;
    }
}
/* Estilos para quebra de linha no Mobile */
@media (max-width: 950px) { 
    .mobile-break {
        display: block; 
        content: ""; 
    }
}
@media (min-width: 951px) {
    .mobile-break {
        display: inline;
    }
}
/* Estilo para centralizar o botão de eventos */
.event-button-wrapper {
    margin-top: 20px; 
    text-align: center;
}

/* --- ESTILOS DE BLOG --- */

.blog-preview-item {
    display: flex;
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px; 
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; 
    text-align: left; 
}

.blog-preview-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.blog-preview-item img {
    width: 100px !important; 
    height: 70px !important; 
    object-fit: cover !important; 
    border-radius: 6px; 
    flex-shrink: 0; 
    display: block; 
}

.blog-preview-details {
    flex-grow: 1; 
}
.blog-preview-details h4 {
    font-family: var(--font-title);
    font-size: 1.1rem; 
    margin-bottom: 5px;
    line-height: 1.3;
    color: var(--ocean-blue);
}
.blog-preview-details p.post-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 5px;
}
.blog-preview-details .box-button {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-top: 5px;
}
.all-blog-button-wrapper {
    text-align: center;
    margin-top: 25px;
}
.mobile-break {
    display: inline;
}
.mobile-break::after {
    content: " "; 
}
@media (max-width: 768px) {
    .mobile-break {
        display: block; 
        width: 100%;
        height: 0;
    }
    .mobile-break::after {
        content: ""; 
    }
    .event-link-wrapper {
        padding: 15px 1rem;
    }

}
.floral-decoration-bottom-right,
.floral-decoration-social-top-left {
    position: absolute;
    z-index: 0;
}

.floral-decoration-bottom-right {
    bottom: 0;
    right: 0;
}

.floral-decoration-social-top-left {
    top: 0;
    left: 0;
}

/* O conteúdo do .hero-content-wrapper precisa estar acima das decorações */
.hero-content-wrapper {
    position: relative;
    z-index: 2; /* acima das flores */
}

/* Mobile: escondendo apenas essas imagens do hero se necessário */
@media (max-width: 768px) {
    .hero-section .floral-decoration-bottom-right,
    .hero-section .floral-decoration-social-top-left {
        display: none !important;
    }
/* =========================================
   REGRAS PARA O CABEÇALHO MOBILE (VERSÃO CORRIGIDA)
============================================ */

@media (max-width: 950px) {
    /* Garante que o container principal seja flexível e os itens fiquem alinhados verticalmente */
    .header-container {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .header-controls {
        display: flex;
        align-items: center;
        gap: 15px; /* Espaçamento entre o ícone e o seletor de idioma */

        /* A CORREÇÃO DEFINITIVA ESTÁ AQUI: */
        /* Esta regra consome todo o espaço à esquerda, empurrando o bloco para a direita. */
        margin-left: auto;
    }

    /* Oculta a navegação principal no mobile */
    .main-nav {
        display: none;
    }
    
    /* Mostra a navegação quando o menu é aberto */
    .main-nav.nav-open {
        display: block;
        /* (Seu CSS para o menu aberto vai aqui) */
    }
}

}