/*
Theme Name: Fundações Portella - Optimized Mobile
Author: Leonardo Portella
Version: 23.0 (Mobile Compatible)
*/

:root {
    --primary: #b91c1c;
    --primary-dark: #7f1d1d;
    --text-dark: #1f1f1f;
    --text-gray: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --whatsapp: #25D366;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--white); 
    color: var(--text-dark); 
    line-height: 1.6; 
    overflow-x: hidden; /* Previne scroll lateral no mobile */
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img, video { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- HEADER --- */
.top-bar { 
    background: var(--primary); color: white; padding: 10px 0; 
    font-size: 0.9rem; font-weight: 500;
}
.header-contact-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.contact-info span { margin-right: 20px; display: inline-block; }

.top-socials a { color: white; margin-left: 15px; font-size: 1.1rem; opacity: 0.9; }
.top-socials a:hover { opacity: 1; transform: scale(1.2); }

.main-header { 
    background: var(--white); padding: 5px 0; 
    position: sticky; top: 0; z-index: 1000; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }

/* LOGO */
.logo img { height: 220px; width: auto; transition: 0.3s; }

/* Menu Desktop */
.desktop-menu { display: flex; gap: 30px; align-items: center; }
.desktop-menu a { 
    color: var(--text-dark); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; position: relative;
}
.desktop-menu a:not(.btn-nav)::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background-color: var(--primary); transition: width 0.3s;
}
.desktop-menu a:not(.btn-nav):hover { color: var(--primary); }
.desktop-menu a:not(.btn-nav):hover::after { width: 100%; }

.btn-nav { 
    background: var(--primary); color: white !important; padding: 10px 25px; 
    border-radius: 4px; font-weight: 700 !important; text-transform: uppercase;
    display: inline-block;
}
.btn-nav:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Mobile Menu Icon (Hidden by default on Desktop) */
.mobile-menu-icon { display: none; font-size: 1.8rem; cursor: pointer; color: var(--primary); padding: 10px; }

/* --- HERO --- */
.hero { padding: 50px 0; background: var(--white); text-align: center; }
.hero-content { margin-bottom: 30px; }
.hero-number { font-size: 3rem; font-weight: 900; color: #f0f0f0; display: block; line-height: 1; margin-bottom: -5px; }
.hero h1 { font-size: 2.4rem; color: var(--text-dark); margin: 10px 0; font-weight: 800; text-transform: uppercase; }

/* Carrossel */
.marquee-wrapper { width: 100%; overflow: hidden; padding: 10px 0; position: relative; margin-bottom: 30px; }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: scroll 60s linear infinite; }
.marquee-track:hover { animation-play-state: paused; } /* Pausa ao passar o mouse/tocar */

.video-card {
    width: 280px; height: 480px; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); flex-shrink: 0; background: #000;
    border: 3px solid var(--primary);
}
.video-card video { width: 100%; height: 100%; object-fit: cover; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-280px * 8 - 160px)); } }

/* --- SECTIONS --- */
.section-pad { padding: 80px 0; }

.services-grid-squares { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px; max-width: 1200px; margin: 0 auto;
}

.service-card-full {
    background: var(--white); border: 1px solid #e5e5e5; border-bottom: 5px solid var(--primary);
    padding: 40px 25px; text-align: center; border-radius: 8px; transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%;
}
.service-card-full:hover {
    background: var(--primary); transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(185, 28, 28, 0.3); border-bottom-color: white;
}
.service-card-full i { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; transition: 0.4s; }
.service-card-full h3 { font-weight: 800; color: var(--text-dark); text-transform: uppercase; font-size: 1.1rem; margin-bottom: 15px; transition: 0.4s; }
.service-card-full p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; transition: 0.4s; }
.service-card-full:hover i, .service-card-full:hover h3, .service-card-full:hover p { color: white; }

.empresa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.empresa-content h3 { color: #888; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 10px; font-weight: 600; }
.empresa-content h2 { color: var(--primary); font-size: 2.5rem; margin-bottom: 25px; line-height: 1.1; font-weight: 800; }
.empresa-content p { margin-bottom: 20px; color: #555; }
.highlight-box { 
    border-left: 4px solid var(--primary); padding-left: 20px; 
    color: var(--text-dark); font-weight: 700; font-size: 1.1rem;
    background: #fdfdfd; padding: 15px; border-radius: 0 5px 5px 0;
}
.tech-spec-box { 
    background: var(--primary); color: white; padding: 50px; border-radius: 15px; 
    text-align: center; box-shadow: 0 15px 30px rgba(185, 28, 28, 0.25);
}
.tech-big { font-size: 2.2rem; font-weight: 900; color: white; margin-top: 5px; display: block; }
.tech-label { font-size: 0.9rem; opacity: 0.9; text-transform: uppercase; margin-top: 15px; display: block;}
.tech-divider { width: 100%; height: 1px; background: rgba(255,255,255,0.3); margin: 25px 0; }

.final-text { text-align: center; padding: 60px 20px; background: var(--white); border-top: 1px solid #eee; }
.final-text p { max-width: 800px; margin: 0 auto; font-size: 1.2rem; color: #444; }

/* --- FOOTER MAIN --- */
footer { background: #111; color: #999; padding: 70px 0 0; border-top: 5px solid var(--primary); }

.footer-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px; 
    margin-bottom: 40px; 
    align-items: start;
}

.footer-logo-caminhao {
    width: 180px; height: auto; 
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.1)); 
    transition: transform 0.3s;
}
.footer-logo-caminhao:hover { transform: scale(1.05) rotate(-2deg); }

.footer-title { 
    color: white; font-weight: 700; margin-bottom: 25px; 
    text-transform: uppercase; border-bottom: 2px solid var(--primary); 
    display: inline-block; padding-bottom: 5px; 
    margin-top: 0;
}

.footer-links li { margin-bottom: 12px; }
.footer-links a:hover { color: white; padding-left: 5px; }

.social-icons { display: flex; gap: 10px; margin-top: 20px; }
.social-btn { 
    width: 40px; height: 40px; background: #222; color: white; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 5px; transition: 0.3s; 
}
.social-btn:hover { background: var(--primary); transform: translateY(-3px) rotate(360deg); }

.footer-separator { width: 100%; height: 1px; background: #222; margin-bottom: 0; }

.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
}

.copyright { font-size: 0.8rem; color: #666; font-weight: 500; }
.copyright strong { color: #888; font-weight: 700; }

.studio-signature { 
    display: flex; align-items: center; gap: 15px; flex-direction: row; 
}

.brand-text {
    font-family: 'Montserrat', sans-serif; 
    font-size: 0.65rem; font-weight: 500;
    color: #555; text-align: left; line-height: 1.3; letter-spacing: 0.5px;
}

.footer-logo-studio img {
    height: 40px; width: auto; 
    filter: brightness(0) invert(1);
    opacity: 0.5;
    transition: all 0.4s;
}

.studio-signature:hover .footer-logo-studio img { 
    opacity: 1; transform: scale(1.2) rotate(-5deg); 
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.whatsapp-float { 
    position: fixed; bottom: 30px; right: 30px; 
    background: var(--whatsapp); color: white; 
    width: 65px; height: 65px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 35px; box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4); z-index: 999;
    transition: 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 900px) {
    /* Top Bar */
    .header-contact-flex { justify-content: center; text-align: center; flex-direction: column; }
    
    /* Menu Mobile Logic */
    .mobile-menu-icon { display: block; }
    
    .desktop-menu {
        display: none; /* Esconde por padrão no mobile */
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        z-index: 999;
    }
    
    /* Quando a classe 'active' for adicionada pelo JS */
    .desktop-menu.active { display: flex; animation: slideDown 0.3s ease-out; }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Ajustes Gerais */
    .logo img { height: 80px; width: auto; } /* Logo menor no mobile */
    .hero h1 { font-size: 1.8rem; }
    .hero-number { font-size: 2rem; }
    
    /* Grid de Empresa e Footer */
    .empresa-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .footer-logo-caminhao { margin: 0 auto; }
    .footer-col-nav { align-items: center; display: flex; flex-direction: column; }
    .footer-col-contact { align-items: center; display: flex; flex-direction: column; }
    
    .footer-bottom-bar { flex-direction: column-reverse; gap: 20px; text-align: center; }
    .studio-signature { justify-content: center; }
    
    /* Botão Whats */
    .whatsapp-float { width: 55px; height: 55px; font-size: 28px; bottom: 20px; right: 20px; }
}