/* PALETE DE CORES EXPANDIDA */
:root {
    --blue-dark: #0d233a;
    --red: #d32f2f;
    --color-kids: #2e7d32; /* Verde */
    --color-pet: #6a1b9a;   /* Roxo */
    --gray-light: #f4f6f9;
    --text-dark: #333;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', system-ui, sans-serif; 
}

body { 
    color: var(--text-dark); 
    line-height: 1.6; 
    background: #fff; 
    overflow-x: hidden; /* Evita que o site deslize para os lados no telemóvel */
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.text-red { color: var(--red); }

.section-title { 
    text-align: center; 
    font-size: 2.2rem; 
    color: var(--blue-dark); 
    margin-bottom: 15px; 
}

.section-subtitle { 
    text-align: center; 
    margin-bottom: 40px; 
    color: #555; 
    padding: 0 10px;
}

/* CABEÇALHO */
header { 
    background: white; 
    padding: 15px 0; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.site-logo {
    max-height: 50px; 
    width: auto;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

nav a { 
    text-decoration: none; 
    color: var(--blue-dark); 
    margin-left: 20px; 
    font-weight: 600; 
    font-size: 0.95rem;
}

nav a:hover { color: var(--red); }

.btn-call { 
    background: var(--red); 
    color: white !important; 
    padding: 10px 20px; 
    border-radius: 50px; 
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* HERO SECTION */
.hero { 
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%); 
    padding: 60px 0; 
}

.hero-grid { 
    display: grid; 
    grid-template-columns: 1.1fr 0.9fr; 
    gap: 40px; 
    align-items: center; 
}

.badge { 
    background: var(--blue-dark); 
    color: white; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: bold; 
    display: inline-block;
    margin-bottom: 10px;
}

.hero-text h1 { 
    font-size: 2.6rem; 
    color: var(--blue-dark); 
    margin: 15px 0; 
    line-height: 1.2; 
}

.hero-text p { 
    font-size: 1.1rem; 
    margin-bottom: 25px; 
    color: #444; 
}

.btn-primary { 
    background: var(--blue-dark); 
    color: white; 
    padding: 15px 30px; 
    text-decoration: none; 
    font-weight: bold; 
    border-radius: 5px; 
    display: inline-block; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    text-align: center;
}

/* HERO GALERIA DE IMAGENS */
.hero-images-gallery { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
    height: 350px; 
}

.gallery-img { 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    position: relative; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    overflow: hidden; 
}

.gallery-img span { 
    position: absolute; 
    bottom: 12px; 
    left: 50%; 
    transform: translateX(-50%);
    background: rgba(13, 35, 58, 0.9); 
    color: white; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    white-space: nowrap;
}

/* SOLUÇÕES */
.solucoes-section { padding: 60px 0; background: white; }
.solucoes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 30px; }

.solucao-card { 
    border-radius: 8px; 
    color: white; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}

.card-img-top { 
    height: 180px; 
    background-size: cover; 
    background-position: center; 
}

.card-senior { background: #1a365d; }
.card-kids { background: #388e3c; }
.card-pet { background: #7b1fa2; }
.s-icon { font-size: 2rem; margin-bottom: 15px; display: block; }
.card-content { padding: 25px; text-align: center; }
.solucao-card h3 { margin-bottom: 10px; font-size: 1.3rem; }

/* COMO FUNCIONA */
.como-funciona { padding: 60px 0; background: var(--gray-light); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 30px; }
.step { text-align: center; background: white; padding: 25px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.step-num { background: var(--red); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto; font-weight: bold; font-size: 1.1rem; }

/* ABAS E PREÇOS */
.planos-section { padding: 60px 0; background: white; }
.tabs-container { display: flex; justify-content: center; gap: 10px; margin-bottom: 35px; flex-wrap: wrap; }
.tab-btn { padding: 12px 24px; border: 2px solid #ccc; background: white; font-size: 1rem; font-weight: bold; border-radius: 50px; cursor: pointer; transition: 0.3s; color: #555; }
.tab-btn.active, .tab-btn:hover { background: var(--blue-dark); color: white; border-color: var(--blue-dark); }
.tab-btn.tab-kids.active, .tab-btn.tab-kids:hover { background: var(--color-kids); border-color: var(--color-kids); }
.tab-btn.tab-pet.active, .tab-btn.tab-pet:hover { background: var(--color-pet); border-color: var(--color-pet); }

.planos-grid { display: grid; gap: 25px; }
.plan-card { background: white; border-radius: 8px; padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.07); text-align: center; position: relative; border: 2px solid #eee; display: flex; flex-direction: column; justify-content: space-between; }

.kit-card-senior { border-color: var(--blue-dark); background: #fbfcfe; }
.kit-card-kids { border-color: var(--color-kids); background: #f8fbf8; }
.kit-card-pet { border-color: var(--color-pet); background: #faf8fb; }
.border-senior { border-color: #cbd5e1; }
.border-kids { border-color: #c8e6c9; }
.border-pet { border-color: #e1bee7; }
.premium-senior { border-color: var(--red); }

.recomended { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); color: white; padding: 4px 18px; font-size: 0.75rem; border-radius: 20px; font-weight: bold; }
.bg-red { background: var(--red); }
.bg-senior { background: var(--blue-dark); }
.bg-kids { background: var(--color-kids); }
.bg-pet { background: var(--color-pet); }

.plan-card h3 { color: #222; font-size: 1.2rem; margin-bottom: 12px; }
.plan-card .price { font-size: 2.5rem; font-weight: bold; color: #111; }
.plan-card .mo { font-size: 1rem; font-weight: normal; }
.plan-card .period { color: #666; margin-bottom: 20px; font-size: 0.85rem; }
.plan-card ul { list-style: none; text-align: left; margin-bottom: 25px; }
.plan-card ul li { margin-bottom: 10px; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 8px; }
.plan-card ul li i { color: #2e7d32; margin-top: 3px; }

.btn-buy { width: 100%; padding: 12px; border: none; color: white; font-weight: bold; border-radius: 6px; cursor: pointer; font-size: 0.95rem; }

/* REQUISITOS DE CONSUMIDOR */
.legal-section { padding: 60px 0; background: var(--gray-light); }
.legal-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.legal-box { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.legal-box h3 { color: var(--blue-dark); margin-bottom: 12px; border-bottom: 2px solid #eee; padding-bottom: 6px; font-size: 1.1rem; }
.legal-box p { margin-bottom: 10px; font-size: 0.85rem; color: #444; }

/* FOOTER */
footer { background: var(--blue-dark); color: white; padding: 40px 0 20px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 25px; }
.footer-links h4 { margin-bottom: 12px; font-size: 1.1rem; }
.footer-links a { display: block; color: #b0bec5; text-decoration: none; margin-bottom: 10px; font-size: 0.9rem; }
.footer-links a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 20px; font-size: 0.8rem; color: #90a4ae; }


/* ==========================================================================
   REGRAS DE RESPONSIVIDADE ECRÃS MÓVEIS (SMARTPHONES E TABLETS)
   ========================================================================== */

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-images-gallery { height: 250px; } /* Encolhe a galeria em tablets */
    
    .solucoes-grid, .steps-grid, .legal-tabs { grid-template-columns: 1fr; gap: 20px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 25px; }
}

@media (max-width: 768px) {
    /* Ajuste do menu superior para telemóveis pequenos */
    .header-flex { flex-direction: column; gap: 15px; text-align: center; }
    nav { justify-content: center; gap: 10px; }
    nav a { margin: 5px 10px; font-size: 0.9rem; }
    .btn-call { width: 100%; justify-content: center; margin-top: 5px; }

    /* Forçar os botões das abas a ocupar largura total ou empilhar de forma limpa */
    .tabs-container { flex-direction: column; width: 100%; align-items: stretch; }
    .tab-btn { width: 100%; text-align: center; border-radius: 8px; }

    /* Ajustar os planos dinâmicos para ficarem um por baixo do outro */
    #segment-content { grid-template-columns: 1fr !important; }
    
    /* Transformar a galeria tripla numa imagem fluida para poupar espaço no telemóvel */
    .hero-images-gallery { height: 180px; gap: 6px; }
    .gallery-img span { font-size: 0.7rem; padding: 2px 8px; bottom: 8px; }
    
    .section-title { font-size: 1.75rem; }
}