/* ==========================================================================
   GSI ALIMENTAÇÕES - ESTILO PRINCIPAL (V3.0 - RED & GOLD PREMIUM)
   ========================================================================== */

:root {
    /* --- PALETA DE CORES (BASEADA NO VÍDEO) --- */
    --vermelho-gsi-deep: #8a0e0e;     /* Vinho Profundo (Fundo Sidebar, Rodapé) */
    --vermelho-gsi-brand: #c21807;    /* Vermelho da Marca (Botões, Destaques) */
    --vermelho-gsi-light: #e62e2e;    /* Vermelho Vivo (Hover) */
    
    --amarelo-gsi: #ffcc00;           /* Amarelo/Ouro (Ícones, Detalhes, "Pingo do i") */
    --amarelo-suave: #fff9e6;         /* Fundo Claro Amarelado (Seções de destaque) */

    /* --- NEUTROS (VISUAL CLEAN) --- */
    --cinza-escuro: #2c3e50;          /* Texto Principal (Substitui o preto puro) */
    --cinza-medio: #6c757d;           /* Texto Secundário */
    --cinza-claro: #e9ecef;           /* Bordas */
    --off-white: #f8f9fa;             /* Fundo Geral */
    --branco: #ffffff;

    /* --- MAPEAMENTO DE VARIÁVEIS (COMPATIBILIDADE COM CÓDIGO ANTIGO) --- */
    /* Isso garante que nada quebre, redirecionando as cores antigas para as novas */
    --azul-petroleo: var(--vermelho-gsi-deep);
    --azul-royal: var(--vermelho-gsi-brand);
    --laranja-vibrante: var(--vermelho-gsi-brand); /* O vermelho assume o papel do laranja */
    --bege-caramelo: var(--amarelo-gsi); /* O amarelo assume o papel do bege */
    --verde: var(--amarelo-gsi);
    
    --preto-texto: var(--cinza-escuro);
    --cinza-texto: var(--cinza-medio);
    --cinza-claro-fundo: var(--off-white);

    /* --- UI --- */
    --font-principal: 'Poppins', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 5px 20px rgba(138, 14, 14, 0.08); /* Sombra avermelhada suave */
    --shadow-hover: 0 15px 30px rgba(138, 14, 14, 0.15);
    --border-radius: 12px;
}

/* ==========================================================================
   ESTILOS GERAIS
   ========================================================================== */

body.light-theme {
    font-family: var(--font-principal);
    background-color: var(--off-white);
    background-image: none; /* Textura removida para visual mais limpo */
    color: var(--preto-texto);
    line-height: 1.7;
    font-weight: 400;
    margin: 0;
}

/* Previne rolagem quando menu mobile está aberto */
body.mobile-menu-active {
    overflow: hidden;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

h1, h2, h3, h4 { 
    color: var(--cinza-escuro); 
    font-weight: 700; 
    letter-spacing: -0.5px;
}

a { 
    text-decoration: none; 
    color: var(--vermelho-gsi-brand); 
    transition: var(--transition); 
}

a:hover { 
    color: var(--vermelho-gsi-deep); 
}

/* ==========================================================================
   SPLASH SCREEN (INTRODUÇÃO)
   ========================================================================== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--vermelho-gsi-brand); /* Fundo Vermelho da Marca */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out 1.8s, visibility 0.5s ease-out 1.8s;
    overflow: hidden;
}

.splash-content {
    animation: fadeInScale 1.5s 1 ease-out 0.3s forwards;
    opacity: 0;
    transform: scale(0.9);
}

.splash-content img {
    max-width: 400px;
}

#splash-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#splash-screen.hidden {
    opacity: 0;
    transition: opacity 0.75s ease-out;
    pointer-events: none;
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Controle de visibilidade do conteúdo principal */
#main-content.hidden {
    opacity: 0;
    visibility: hidden;
    display: none; /* Garante que não ocupe espaço */
}

#main-content.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in;
    display: block;
}

/* ==========================================================================
   BARRA DE NAVEGAÇÃO (NAVBAR)
   ========================================================================== */
.navbar {
    background-color: rgba(255,255,255,0.98); /* Branco quase sólido */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 85px;
}

.navbar-container {
    height: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.navbar-brand img {
    max-height: 65px;
    width: auto;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--preto-texto);
    white-space: nowrap;
}

/* Links do Menu Desktop */
.navbar-links ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar-links a {
    color: var(--cinza-escuro);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* Efeito de sublinhado vermelho */
.navbar-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--vermelho-gsi-brand);
    transition: var(--transition);
    border-radius: 2px;
}

.navbar-links a:hover::after {
    width: 100%;
}

.navbar-links a:hover {
    color: var(--vermelho-gsi-brand);
}

.navbar-links a i {
    font-size: 0.9rem;
    color: var(--amarelo-gsi); /* Ícones em Amarelo */
}

/* Área de Ação (CTA) */
.navbar-cta-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cta-button {
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(194, 24, 7, 0.3);
    white-space: nowrap;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--vermelho-gsi-deep);
    color: var(--branco);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194, 24, 7, 0.4);
}

.cta-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   HERO CAROUSEL (PRINCIPAL)
   ========================================================================== */
.hero-carousel-section {
    height: 90vh;
    position: relative;
    color: var(--branco);
    margin-top: 0;
}

.hero-carousel, .swiper-container {
    width: 100%;
    height: 100%;
}

.hero-carousel .swiper-slide {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Overlay Gradiente Vinho para contraste */
.hero-carousel .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(60, 10, 10, 0.9), rgba(60, 10, 10, 0.3));
    z-index: 2;
}

.hero-carousel .hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    /* CORREÇÃO: Padding lateral para evitar que o texto encoste nas setas em desktops menores */
    padding: 0 60px; 
}

.hero-carousel .slide-tag {
    display: inline-block;
    background-color: var(--amarelo-gsi);
    color: var(--vermelho-gsi-deep);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-carousel .hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--branco);
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    line-height: 1.1;
}

.hero-carousel .hero-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* Botão Grande da Hero */
.cta-button-large { 
    font-size: 1.1rem; 
    padding: 16px 45px; 
    background-color: var(--vermelho-gsi-brand);
}
.cta-button-large:hover {
    background-color: var(--branco);
    color: var(--vermelho-gsi-brand);
}

/* Estilos específicos para Slide de Feedback */
.hero-carousel .feedback-slide-content .hero-title {
    font-size: 2.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.4;
}

/* Navegação Swiper */
.hero-carousel .swiper-button-next,
.hero-carousel .swiper-button-prev {
    color: var(--amarelo-gsi);
    opacity: 0.8;
    transition: var(--transition);
}

.hero-carousel .swiper-button-next:hover,
.hero-carousel .swiper-button-prev:hover {
    opacity: 1;
    transform: scale(1.1);
}

.hero-carousel .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    width: 10px;
    height: 10px;
    opacity: 1;
}

.hero-carousel .swiper-pagination-bullet-active {
    background: var(--amarelo-gsi);
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   SEÇÕES DE CONTEÚDO (GERAL)
   ========================================================================== */
.content-section { 
    padding: 100px 0; 
}

.content-section h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
    color: var(--vermelho-gsi-deep);
}

p.subtitle-text { 
    text-align: center; 
    max-width: 700px; 
    margin: 0 auto 60px; 
    font-size: 1.1rem; 
    color: var(--cinza-texto);
}

.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 40px; 
}

/* Cards (Diferenciais) */
.card {
    background: var(--branco);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-hover);
    border-color: rgba(194, 24, 7, 0.1);
}

.card i { 
    font-size: 3.5rem; 
    color: var(--vermelho-gsi-brand); 
    margin-bottom: 1.5rem; 
    transition: var(--transition);
    background: var(--amarelo-suave);
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    display: inline-block;
}

.card:hover i {
    background-color: var(--vermelho-gsi-brand);
    color: var(--amarelo-gsi);
    transform: rotateY(180deg);
}

.card h3 { 
    margin-bottom: 1rem; 
    font-size: 1.4rem;
    color: var(--cinza-escuro);
}

.card p { 
    color: var(--cinza-texto); 
    font-size: 0.95rem; 
}

/* ==========================================================================
   FORMULÁRIO DE COTAÇÃO
   ========================================================================== */
.contact-form-section {
    padding: 80px 0;
    background-color: var(--amarelo-suave);
}

.form-wrapper {
    background-color: var(--branco);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
    border-top: 6px solid var(--vermelho-gsi-brand);
}

.form-wrapper .section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--vermelho-gsi-deep);
}

.form-wrapper p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--cinza-texto);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cinza-escuro);
}

.form-control,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-principal);
    box-sizing: border-box;
    transition: var(--transition);
    background-color: var(--off-white);
    color: var(--preto-texto);
}

.form-control::placeholder {
    color: #999;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--vermelho-gsi-brand);
    background-color: var(--branco);
    box-shadow: 0 0 0 4px rgba(194, 24, 7, 0.1);
}

.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.form-wrapper .cta-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Status do Formulário */
#form-status {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease-in-out;
}

#form-status.form-status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#form-status.form-status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ==========================================================================
   FORMULÁRIOS GENÉRICOS
   ========================================================================== */
.form-container {
    background: var(--branco);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-feedback { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group.full-width, .form-grid-feedback .full-width { grid-column: 1 / -1; }

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.site-footer {
    background-color: var(--vermelho-gsi-deep); /* Fundo Vinho */
    color: rgba(255,255,255,0.9);
    padding: 80px 0 30px;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    margin-bottom: 40px; 
}

.footer-col h3 { 
    color: var(--amarelo-gsi); /* Títulos em Amarelo */
    margin-bottom: 25px; 
    font-size: 1.3rem;
}

.footer-col p { 
    margin-bottom: 10px; 
    opacity: 0.9; 
}

.footer-col ul { 
    list-style: none; 
    padding: 0; 
}

.footer-col ul li a {
    color: rgba(255,255,255,0.8);
    opacity: 0.9;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--branco);
    opacity: 1;
    padding-left: 5px;
}

.footer-social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.footer-social-icons a {
    color: var(--branco);
    font-size: 1.8rem;
    background: rgba(255,255,255,0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social-icons a:hover {
    background: var(--amarelo-gsi);
    color: var(--vermelho-gsi-deep);
    transform: translateY(-5px);
}

.newsletter-form { display: flex; }
.newsletter-form input { flex: 1; padding: 10px; border: none; border-radius: 5px 0 0 5px; }
.newsletter-form button { border-radius: 0 5px 5px 0; padding: 10px 15px; border: none; cursor: pointer; }

.footer-bottom { 
    text-align: center; 
    padding-top: 30px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    margin-top: 50px;
    opacity: 0.8; 
}

/* ==========================================================================
   HEADER DE PÁGINAS INTERNAS
   ========================================================================== */
.page-header {
    background-image:
        /* Gradiente Vinho/Vermelho */
        linear-gradient(to right, rgba(138, 14, 14, 0.95), rgba(194, 24, 7, 0.85)),
        url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070&auto=format&fit=crop');
    
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center center;
    padding: 180px 0 100px 0;
    text-align: center;
    color: var(--branco);
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--branco);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* ==========================================================================
   GSI CONNECT (BLOG CARDS)
   ========================================================================== */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--preto-texto);
}

.gsi-connect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.post-card {
    background: var(--branco);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
    border-bottom: 4px solid transparent;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(138, 14, 14, 0.1);
    border-bottom-color: var(--vermelho-gsi-brand);
}

.post-card-image {
    position: relative;
    height: 220px;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--amarelo-gsi);
    color: var(--vermelho-gsi-deep);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: var(--preto-texto);
}

.post-card-content p {
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.post-card-footer {
    font-size: 0.9rem;
    color: var(--cinza-texto);
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-link {
    color: var(--vermelho-gsi-brand);
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.read-more-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.post-card:hover .read-more-link i,
.read-more-link:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   MODAL (PORTFOLIO & CONNECT)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(138, 14, 14, 0.7); /* Fundo avermelhado escuro */
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--branco);
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    position: relative;
    animation: slide-down 0.5s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes slide-down {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-button:hover,
.close-button:focus {
    color: var(--vermelho-gsi-brand);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.modal-content h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.modal-meta {
    color: var(--cinza-texto);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.modal-body {
    overflow-y: auto;
    padding-right: 15px;
}

.modal-body p, .modal-body li {
    font-size: 1.1rem;
    line-height: 1.8;
}

.modal-body ul, .modal-body ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

/* ==========================================================================
   FEEDBACK CAROUSEL
   ========================================================================== */
.feedback-carousel-section {
    padding: 100px 0;
    background-color: var(--branco);
}

.feedback-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 60px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.feedback-track {
    display: flex;
    animation: scroll 40s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.feedback-slide {
    width: 370px;
    margin: 0 15px;
    flex-shrink: 0;
    background: var(--off-white);
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: var(--shadow);
    position: relative;
    padding-top: 50px;
}

.feedback-icon {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--amarelo-gsi);
    color: var(--vermelho-gsi-deep);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feedback-slide-content {
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

.feedback-slide-author {
    text-align: center;
}

.feedback-slide-author strong {
    display: block;
    color: var(--preto-texto);
}

/* ==========================================================================
   AVALIAÇÃO (ESTRELAS)
   ========================================================================== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin: 10px auto 20px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating:not(:checked) label:hover,
.star-rating:not(:checked) label:hover ~ label {
    color: var(--amarelo-gsi);
}

.invalid-feedback {
    color: var(--vermelho-gsi-brand);
    text-align: center;
    margin-top: -10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* ==========================================================================
   PORTFÓLIO (TIMELINE)
   ========================================================================== */
.portfolio-timeline {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 60px;
}

.portfolio-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

/* Alterna a ordem */
.portfolio-item:nth-child(even) .portfolio-image {
    order: 2;
}
.portfolio-item:nth-child(even) .portfolio-content {
    order: 1;
}

.portfolio-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.portfolio-content .category {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vermelho-gsi-brand);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.portfolio-content h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.portfolio-content p {
    margin-bottom: 30px;
}

/* ==========================================================================
   PAGINAÇÃO
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin-top: 60px;
    gap: 10px;
}

.pagination .page-link {
    color: var(--vermelho-gsi-brand);
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
}

.pagination .page-link:hover {
    background-color: #f1f1f1;
    border-color: #ccc;
    color: var(--vermelho-gsi-deep);
}

.pagination .page-item.active .page-link {
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
    border-color: var(--vermelho-gsi-brand);
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
    background-color: #f9f9f9;
    border-color: #ddd;
    pointer-events: none;
}

/* ==========================================================================
   CHATBOT
   ========================================================================== */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1010;
}

.chatbot-bubble {
    width: 200px;
    height: 60px;
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.chatbot-bubble:hover {
    background-color: var(--vermelho-gsi-deep);
    transform: scale(1.05);
}

.chatbot-bubble #joca-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.chatbot-window {
    width: 370px;
    height: 500px;
    background: var(--branco);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chatbot-window.open {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chatbot-header {
    background: var(--vermelho-gsi-brand);
    color: var(--branco);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 { color: var(--branco); margin: 0; font-size: 1.1rem; }

.close-chatbot-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

.chatbot-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    animation: messageFadeIn 0.3s ease-out forwards;
}

@keyframes messageFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    background-color: #e9ecef;
    color: var(--preto-texto);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.bot.loading p {
    display: flex;
    gap: 5px;
    align-items: center;
}

.chat-message.bot.loading span {
    width: 8px; height: 8px; background: #999; border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.chat-message.bot.loading span:nth-child(1) { animation-delay: -0.32s; }
.chat-message.bot.loading span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Quick Replies */
.chatbot-quick-replies {
    padding: 0 15px 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #eee;
}

.quick-reply-btn {
    background-color: var(--branco);
    color: var(--vermelho-gsi-brand);
    border: 1px solid var(--vermelho-gsi-brand);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-reply-btn:hover {
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
}

.chatbot-footer {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
}

#chatbot-input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    border-radius: 20px;
    background-color: #f1f1f1;
    font-family: var(--font-principal);
}

#chatbot-input:focus { outline: none; }

#chatbot-send {
    background: var(--vermelho-gsi-brand);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* ==========================================================================
   ALERTAS FLASH
   ========================================================================== */
.flash-messages-container {
    padding-top: 100px;
    padding-bottom: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid transparent;
    border-left-width: 5px;
    animation: fadeIn 0.5s ease-out;
    position: relative;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-left-color: #27ae60;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-left-color: var(--vermelho-gsi-brand);
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-left-color: #2980b9;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-left-color: var(--amarelo-gsi);
}

/* ==========================================================================
   SEÇÃO NÚMEROS (A GSI EM NÚMEROS)
   ========================================================================== */
.numeros-section {
    background-color: var(--branco);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.numeros-section .section-title {
    margin-bottom: 60px;
}

.numeros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.numero-item {
    text-align: center;
    padding: 20px;
}

.numero-item h3 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--vermelho-gsi-brand);
    margin: 0 0 10px 0;
}

.numero-item p {
    font-size: 1.1rem;
    color: var(--cinza-texto);
    font-weight: 500;
}

/* ==========================================================================
   PÁGINA SOLUÇÕES (CARDS)
   ========================================================================== */
.solution-item {
    text-align: left;
    max-width: none;
}

.solution-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px;
}

.solution-card {
    background: var(--branco);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(138, 14, 14, 0.1);
}

.solution-card-image {
    height: 250px;
    overflow: hidden;
}

.solution-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.solution-card:hover .solution-card-image img {
    transform: scale(1.05);
}

.solution-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.solution-card-content h3 {
    font-size: 1.6rem;
    color: var(--preto-texto);
    margin: 0 0 15px 0;
}

.solution-card-content p {
    margin: 0 0 25px 0;
    flex-grow: 1;
    color: var(--cinza-texto);
}

.cta-button-small {
    background-color: var(--vermelho-gsi-brand);
    color: var(--branco);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(194, 24, 7, 0.3);
    transition: var(--transition);
    text-align: center;
    display: inline-block;
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.cta-button-small:hover {
    background-color: var(--vermelho-gsi-deep);
    color: var(--branco);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 24, 7, 0.4);
}

/* ==========================================================================
   RESPONSIVIDADE E MENU MOBILE (INTEGRADO)
   ========================================================================== */

/* Elementos do Mobile (Ocultos por padrão no desktop) */
.mobile-nav-toggle { display: none; }
.mobile-nav, .menu-overlay { display: none; }

/* Logo no menu mobile */
.mobile-menu-logo {
    height: 40px;
    width: auto;
}

/* --- LAYOUT MOBILE & MENU LATERAL (OFF-CANVAS) --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    z-index: 1011; /* Acima do chatbot */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--branco);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1012;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: none;
    flex-direction: column;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    border-bottom: 1px solid #eee;
    background-color: var(--off-white);
    position: relative;
}

.mobile-nav-header span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--vermelho-gsi-brand);
    text-transform: uppercase;
    /* Centralização absoluta */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--cinza-medio);
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.mobile-nav ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.mobile-nav ul li a {
    display: flex; /* Flex para alinhar ícone e texto */
    align-items: center;
    padding: 18px 30px;
    color: var(--cinza-escuro);
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.mobile-nav ul li a:hover {
    background: var(--amarelo-suave);
    color: var(--vermelho-gsi-brand);
    padding-left: 35px;
}

.mobile-nav ul li a i {
    color: var(--amarelo-gsi);
    margin-right: 15px;
    width: 25px; /* Largura fixa para alinhamento */
    text-align: center;
    font-size: 1.1rem;
}

.mobile-nav .mobile-cta {
    padding: 25px;
    margin-top: auto;
    text-align: center;
    background-color: var(--off-white);
}

.mobile-nav .mobile-cta .cta-button {
    width: 100%;
    display: block;
}

/* Estados Ativos (Controlados por JS) */
body.mobile-menu-active .menu-overlay {
    display: block;
    opacity: 1;
}
body.mobile-menu-active .mobile-nav {
    right: 0;
}

/* NOVO: ESCONDER O CHATBOT QUANDO O MENU MOBILE ESTIVER ABERTO */
body.mobile-menu-active .chatbot-container {
    display: none !important;
}


/* ==========================================================================
   BREAKPOINTS (MEDIA QUERIES)
   ========================================================================== */

/* Tablet e Menores (< 992px) */
@media (max-width: 992px) {
    html, body { overflow-x: hidden; width: 100%; }
    
    .container { padding-left: 1rem; padding-right: 1rem; }

    .navbar { height: 80px; }
    .navbar-container { padding: 0 1rem; }
    .navbar-brand img { max-height: 55px; }
    .cta-button { padding: 10px 15px; font-size: 0.9rem; }
    
    .navbar-links { display: none !important; }
    
    /* CORREÇÃO: Esconder setas do slider em tablets/mobile para não cobrir texto (use swipe) */
    .swiper-button-next, .swiper-button-prev { display: none !important; }

    .mobile-nav-toggle {
        display: block;
        color: var(--vermelho-gsi-brand);
        font-size: 1.8rem;
        cursor: pointer;
        margin-left: 15px;
        background: none;
        border: none;
        padding: 5px;
    }
    .mobile-nav { display: flex; }

    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-carousel .feedback-slide-content .hero-title { font-size: 2rem; }

    .form-row, .numeros-grid { grid-template-columns: repeat(2, 1fr); }
    .solution-card-grid { grid-template-columns: 1fr; }
    
    .numero-item h3 { font-size: 3rem; }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .container { padding-left: 1.2rem; padding-right: 1.2rem; }
    
    .grid-3, .footer-grid, .numeros-grid, .form-row, .gsi-connect-grid { 
        grid-template-columns: 1fr; 
    }
    
    .form-grid, .form-grid-feedback { 
        grid-template-columns: 1fr; 
    }
    
    .form-wrapper { padding: 30px 20px; }
    .section-title { font-size: 2rem; }
    
    .page-header h1 { font-size: 2.5rem; }
    .page-header p { font-size: 1.1rem; }

    .portfolio-item { grid-template-columns: 1fr; gap: 30px; }
    .portfolio-item:nth-child(even) .portfolio-image { order: 1; }
    .portfolio-item:nth-child(even) .portfolio-content { order: 2; }
    .portfolio-image img { height: 300px; }

    .pagination .page-link { padding: 8px 12px; font-size: 0.9rem; }

    .hero-carousel .hero-title { font-size: 2.2rem; }
    .hero-carousel .hero-subtitle { font-size: 1rem; }
    .hero-carousel .feedback-slide-content .hero-title { font-size: 1.6rem; }
    .cta-button-large { padding: 12px 30px; font-size: 1rem; }

    .numero-item h3 { font-size: 2.8rem; }
    .numeros-section .section-title { font-size: 2rem; }

    .navbar { height: 70px; }
    .navbar-container { padding-left: 0.8rem; padding-right: 0.8rem; }
    .navbar-brand img { max-height: 45px; }
    .navbar-cta-area .cta-button { display: none; }
    .mobile-nav-toggle { margin-left: 8px; font-size: 1.6rem; }
    .mobile-nav { width: 280px; right: -280px; }

    /* --- CHATBOT MOBILE CORRIGIDO (TEXTO MANTIDO + BALÃO FLUTUANTE) --- */

    .chatbot-container {
        bottom: 20px;
        right: 20px;
        z-index: 10010; /* Acima de tudo */
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Alinha tudo à direita */
    }

    /* 1. Botão com Texto (Menor que Desktop, mas com texto mantido) */
    .chatbot-bubble {
        width: auto; /* Deixa o tamanho se ajustar ao texto */
        min-width: 160px; /* Tamanho mínimo */
        height: 50px; /* Um pouco mais baixo que desktop (que é 60px) */
        padding: 0 20px;
        font-size: 0.95rem; /* Texto levemente menor */
    }
    
    .chatbot-bubble span {
        display: block !important; /* Garante que o texto apareça */
    }

    .chatbot-bubble #joca-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }

    /* 2. Janela Flutuante (Não Tela Cheia) */
    .chatbot-window {
        width: 340px; /* Largura fixa confortável */
        max-width: 90vw; /* Garante que não estoure telas muito pequenas */
        height: 450px; /* Altura fixa */
        max-height: 60vh; /* Máximo 60% da altura da tela para ver o fundo */
        
        /* Posicionamento acima do botão */
        position: absolute; 
        bottom: 70px; /* Distância do fundo (altura do botão + margem) */
        right: 0; /* Alinhado à direita do container */
        
        /* Resetando propriedades de tela cheia */
        top: auto;
        left: auto;
        border-radius: 15px; /* Mantém bordas arredondadas */
    }
}

/* ==========================================================================
   CORREÇÃO DO VÍDEO DE ENTRADA (SPLASH) NO CELULAR
   ========================================================================== */
@media (max-width: 768px) {
    #splash-video {
        /* 'contain' garante que o vídeo apareça inteiro, sem cortes */
        object-fit: contain !important; 
        
        /* Opcional: Ajusta a largura para não ficar colado nas bordas se preferir */
        width: 90%; 
        height: auto; 
        
        /* Centraliza verticalmente se não estiver usando flexbox no pai */
        display: block;
        margin: 0 auto;
    }
}

.mobile-nav .cta-button,
.navbar-collapse .cta-button {
    background-color: #c21807 !important; /* Vermelho GSI Brand */
    color: #ffffff !important;
    opacity: 1 !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(194, 24, 7, 0.3) !important;
}

/* Cor ao clicar (Fica um vinho mais escuro) */
.mobile-nav .cta-button:hover,
.mobile-nav .cta-button:active {
    background-color: #8a0e0e !important; /* Vermelho GSI Deep */
}