/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header e Navegação */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo img {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    transition: left 0.3s ease;
    z-index: -1;
}

.menu a:hover::before {
    left: 0;
}

.menu a:hover {
    color: white;
    transform: translateY(-2px);
}

.menu a.active {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

/* Seletor de idiomas */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Esconder seletor mobile em desktop */
.mobile-language-selector {
    display: none;
}

.flag-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.flag-btn svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.flag-btn:hover {
    transform: scale(1.1);
    border-color: #8B4513;
}

.flag-btn.active {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.1);
    transform: scale(1.05);
}

/* Menu mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Seções principais */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Seção Home */
#home {
    background: linear-gradient(135deg, rgba(46, 15, 11, 0.8), rgba(160, 82, 45, 0.8)), 
                url('imagens/Egungunfeed.png.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
}

.welcome-text {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.welcome-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.welcome-text .institution-description {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 500;
}

.welcome-text .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

/* Seção Ações Sociais */
#acoes-sociais {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), 
                url('imagens/acao-social.jpg');
    background-size: cover;
    background-position: center;
    color: white;
}

.acoes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
}

.acoes-column, .reunioes-column {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.acoes-column h2, .reunioes-column h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.acoes-grid, .reunioes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.acoes-grid img, .reunioes-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.acoes-grid img:hover, .reunioes-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Seção Festivais */
#festivais {
    background: linear-gradient(135deg, rgba(46, 15, 11, 0.8), rgba(160, 82, 45, 0.9)), 
                url('imagens/fundo-egungun.jpeg');
    background-size: cover;
    background-position: center;
    color: white;
    min-height: 120vh;
}

#festivais h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.festival-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 150px);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.small-grid {
    grid-column: 1 / 4;
    grid-row: 1 / 5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1rem;
    height: 100%;
}

.small-grid .festival-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0;
}

.festival-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.festival-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.main-image {
    grid-column: 4 / 7;
    grid-row: 1 / 5;
}

/* Seção Quem Somos */
#quem-somos {
    background: linear-gradient(135deg, rgba(46, 15, 11, 0.8), rgba(160, 82, 45, 0.8)), 
                url('imagens/quem-somos.jpg');
    background-size: cover;
    background-position: center;
    color: white;
}

#quem-somos h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.quem-somos-text {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.quem-somos-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.quem-somos-text p:first-child {
    font-size: 1.3rem;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 2rem;
}

/* Seção Contato */
#contato {
    background: #ffffff;
    color: #333;
    min-height: auto;
    padding: 4rem 2rem 2rem;
}

#contato h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2E0F0B;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.contact-logo {
    width: 100%;
    max-width: 350px;
    height: auto;
    max-height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: contain;
}

.contact-info {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.contact-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2E0F0B;
}

.address {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #666;
}

.social-media-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #2E0F0B;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #2E0F0B;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-icon:hover {
    background: #8B4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.map-container {
    background: #f8f8f8;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Botão WhatsApp */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.whatsapp-button img {
    width: 35px;
    height: 35px;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade */
@media (max-width: 1200px) {
    .content {
        padding: 0 1rem;
    }
    
    .festival-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, 120px);
        gap: 0.8rem;
    }
    
    .small-grid {
        grid-column: 1 / 4;
        grid-row: 1 / 5;
    }
    
    .main-image {
        grid-column: 4 / 7;
        grid-row: 1 / 5;
    }
}

@media (max-width: 992px) {
    .menu {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .language-selector {
        display: none;
    }
    
    .menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    /* Seletor de idiomas mobile */
    .mobile-language-selector {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid #eee;
        position: relative;
        z-index: 15;
    }

    .mobile-lang-label {
        font-size: 1rem;
        font-weight: 600;
        color: #1a1a1a;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-flags {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .mobile-flag-btn {
        background: none;
        border: 2px solid transparent;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0;
        overflow: hidden;
        position: relative;
        z-index: 10;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .mobile-flag-btn svg {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .mobile-flag-btn:hover {
        transform: scale(1.1);
        border-color: #8B4513;
    }

    .mobile-flag-btn.active {
        border-color: #8B4513;
        background: rgba(139, 69, 19, 0.1);
        transform: scale(1.05);
    }
    
    .welcome-text h1 {
        font-size: 2.5rem;
    }
    
    .institution-description {
        font-size: 1.1rem;
    }
    
    .festival-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, 100px);
        gap: 0.6rem;
    }
    
    .small-grid {
        grid-column: 1 / 4;
        grid-row: 1 / 5;
    }
    
    .main-image {
        grid-column: 4 / 7;
        grid-row: 1 / 5;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .acoes-grid img, .reunioes-grid img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    .logo img {
        height: 60px;
    }

    .mobile-language-selector {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .mobile-flag-btn {
        width: 45px;
        height: 45px;
    }
    
    section {
        padding: 5rem 1rem 2rem;
    }
    
    .welcome-text h1 {
        font-size: 2rem;
    }
    
    .institution-description {
        font-size: 1rem;
    }
    
    .acoes-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .acoes-column, .reunioes-column {
        padding: 1.5rem;
    }
    
    .acoes-column h2, .reunioes-column h2 {
        font-size: 2rem;
    }
    
    .acoes-grid, .reunioes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .acoes-grid img, .reunioes-grid img {
        height: 250px;
    }
    
    .festival-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, 90px);
        gap: 0.5rem;
    }
    
    .small-grid {
        grid-column: 1 / 4;
        grid-row: 1 / 5;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 0.5rem;
        height: 100%;
    }
    
    .main-image {
        grid-column: 4 / 7;
        grid-row: 1 / 5;
        height: 100%;
    }
    
    .small-grid .festival-image {
        aspect-ratio: 1/1;
        object-fit: cover;
        width: 100%;
        height: 100%;
        padding: 0;
        background: none;
    }
    
    #festivais h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .quem-somos-text {
        padding: 2rem;
    }
    
    .quem-somos-text p {
        font-size: 1rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .whatsapp-button img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 100px;
    }
    
    .welcome-text h1 {
        font-size: 1.8rem;
    }

    .mobile-language-selector {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .mobile-lang-label {
        font-size: 0.9rem;
    }

    .mobile-flags {
        gap: 0.8rem;
    }

    .mobile-flag-btn {
        width: 40px;
        height: 40px;
    }
    
    .institution-description {
        font-size: 0.9rem;
    }
    
    .acoes-grid img, .reunioes-grid img {
        height: 200px;
    }
    
    .festival-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .small-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 0.5rem;
        width: 100%;
        height: auto;
    }
    
    .small-grid .festival-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        object-fit: contain;
        padding: 0;
        background: none;
    }
    
    .main-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        object-fit: contain;
        grid-column: auto;
        grid-row: auto;
        margin-top: 1rem;
    }
    
    #festivais h2 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-button {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .whatsapp-button img {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 320px) {
    .welcome-text h1 {
        font-size: 1.5rem;
    }
    
    .institution-description {
        font-size: 0.8rem;
    }
    
    .content {
        padding: 0 0.5rem;
    }
    
    .acoes-grid img, .reunioes-grid img {
        height: 180px;
    }
    
    .small-grid {
        grid-template-rows: repeat(6, 80px);
    }
    
    .main-image {
        height: 200px;
    }
}

/* Melhorias para carrossel e outras funcionalidades existentes */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-slide.active img {
    transform: scale(1.05);
}

.carousel-slide img:hover {
    transform: scale(1.1);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.cnpj {
    margin-top: 0.7rem;
    font-size: 1.1rem;
    color: #2E0F0B;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
} 

/* Seletor de idioma mobile ao lado do menu hamburguer */
.language-selector-mobile {
    display: none;
}

@media (max-width: 992px) {
    .language-selector-mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: 1rem;
    }
    .language-selector-mobile .mobile-flag-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        border: 2px solid transparent;
        background: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    .language-selector-mobile .mobile-flag-btn.active {
        border-color: #8B4513;
        background: rgba(139, 69, 19, 0.1);
    }
    .language-selector-mobile .mobile-flag-btn svg {
        width: 100%;
        height: 100%;
        border-radius: 50%;
    }
}

@media (min-width: 993px) {
    .language-selector-mobile {
        display: none !important;
    }
} 