/* ============================================
   DSIC Seixal — Torre da Marinha
   Institutional Website Stylesheet
   Brand: DS Crédito (DS Intermediários de Crédito)
   ============================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --primary:       #d80c65;   /* magenta — CTAs, icons, accents */
    --primary-dark:  #900843;   /* deep burgundy — hover states, header bg */
    --primary-xdark: #2f0316;   /* near-black — hero gradient, footer */
    --primary-light: rgba(216, 12, 101, 0.10);

    /* Neutral Palette */
    --white:         #ffffff;
    --gray-light:    #f5f5f5;
    --gray-mid:      #bfbfbf;
    --gray-border:   #e0e0e0;
    --text-dark:     #1a1a1a;
    --text-muted:    #555555;

    /* Typography */
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shape */
    --radius-pill:  30px;
    --radius-card:  12px;
    --radius-input: 8px;

    /* Spacing */
    --section-padding: 90px 0;
    --container:       1200px;

    /* Transitions */
    --t-fast:   0.2s ease;
    --t-normal: 0.3s ease;

    /* Header */
    --header-h: 72px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ============================================
   Container
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Skip Link (Accessibility)
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 0 0 var(--radius-input) var(--radius-input);
    font-weight: 600;
    z-index: 9999;
    transition: top var(--t-fast);
}

.skip-link:focus {
    top: 0;
    color: var(--white);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--t-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(216, 12, 101, 0.35);
}

.btn-ghost {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-ghost:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   Section Badge
   ============================================ */
.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(216, 12, 101, 0.25);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ============================================
   Fade-in Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: transparent;
    transition: background var(--t-normal), box-shadow var(--t-normal);
}

.header.scrolled {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.15;
    color: var(--white);
    transition: color var(--t-fast);
}

.logo-text span {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.8;
}

.header.scrolled .logo-text {
    color: var(--primary-dark);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.88);
    padding: 6px 12px;
    border-radius: 6px;
    transition: color var(--t-fast), background var(--t-fast);
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.header.scrolled .nav-link {
    color: var(--text-muted);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* CTA Nav Button */
.nav-cta {
    padding: 10px 24px;
    font-size: 0.85rem;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 3px;
}

.header.scrolled .lang-switcher {
    background: var(--gray-light);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    padding: 5px 11px;
    border-radius: 16px;
    transition: all var(--t-fast);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--white);
}

.header.scrolled .lang-btn {
    color: var(--text-muted);
}

.header.scrolled .lang-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background var(--t-fast);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header.scrolled .mobile-menu-btn:hover {
    background: var(--gray-light);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--t-normal);
}

.header.scrolled .mobile-menu-btn span {
    background: var(--text-dark);
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-xdark) 0%, var(--primary-dark) 60%, #5a0530 100%);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-h);
}

/* Subtle decorative pattern */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(216, 12, 101, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(144, 8, 67, 0.20) 0%, transparent 50%);
    pointer-events: none;
}

/* Geometric accent */
.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--white);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.90);
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero h1 em {
    font-style: normal;
    color: #ff9dc8;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.65;
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.hero-scroll {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 1;
    animation: heroScrollBounce 2s ease-in-out infinite;
}

.hero-scroll svg {
    width: 20px;
    height: 20px;
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================
   Services Strip
   ============================================ */
.services {
    padding: var(--section-padding);
    background: var(--white);
}

.services-header {
    text-align: center;
    margin-bottom: 56px;
}

.services-header h2 {
    color: var(--text-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-card);
    padding: 32px 24px;
    transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
    border-color: var(--primary);
}

.service-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    transition: background var(--t-normal), color var(--t-normal);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================
   Quem Somos Section
   ============================================ */
.about {
    padding: var(--section-padding);
    background: var(--gray-light);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text {
    /* left column */
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.about-pull {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 28px 0;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.65;
}

.about-disclaimer {
    font-size: 0.78rem;
    color: var(--gray-mid);
    line-height: 1.5;
    margin-top: 24px;
    margin-bottom: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: var(--section-padding);
    background: var(--white);
}

.contact-header {
    text-align: center;
    margin-bottom: 56px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.contact-header p {
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 0;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

/* Contact Form */
.contact-form {
    background: var(--gray-light);
    border-radius: var(--radius-card);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
}

.form-label .required {
    color: var(--primary);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius-input);
    font-family: var(--font-main);
    font-size: 0.92rem;
    color: var(--text-dark);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
}

.form-control::placeholder {
    color: var(--gray-mid);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(216, 12, 101, 0.12);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' 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 14px center;
    padding-right: 44px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* Consent Checkbox */
.form-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    margin-top: 2px;
}

.form-consent label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    cursor: pointer;
}

.form-consent a {
    color: var(--primary);
    text-decoration: underline;
}

/* Form Messages */
.form-message {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-input);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    align-items: center;
    gap: 10px;
}

.form-message.success {
    display: flex;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
}

.form-message.error {
    display: flex;
    background: #fff1f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.btn-submit {
    width: 100%;
    padding: 15px 32px;
    font-size: 1rem;
}

/* Contact Info Panel */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.contact-info-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info-item h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.contact-info-item p,
.contact-info-item a {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0;
    word-break: break-word;
}

.contact-info-item a:hover {
    color: var(--primary);
}

/* Map */
.map-wrap {
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--gray-border);
    height: 240px;
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-xdark);
    color: rgba(255, 255, 255, 0.75);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-brand .logo-text {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.60);
    margin-bottom: 0;
    max-width: 320px;
}

.footer-social {
    margin-top: 20px;
}

.footer-social-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
}

.footer-social-icons {
    display: flex;
    gap: 10px;
}

.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.55);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.footer-social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.60);
    transition: color var(--t-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-legal {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.40);
    line-height: 1.6;
    max-width: 640px;
    margin-bottom: 0;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.40);
    white-space: nowrap;
}

.footer-disclosure-wrap {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 0 24px;
}

.footer-disclosure {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.28);
    line-height: 1.65;
    margin-bottom: 0;
}

.footer-disclosure a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-disclosure a:hover {
    color: var(--primary);
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 680px;
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-card);
    padding: 20px 24px;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.30);
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    font-size: 0.85rem;
    line-height: 1.55;
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-decline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.70);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

.btn-cookie-decline:hover {
    border-color: rgba(255, 255, 255, 0.50);
    color: var(--white);
}

.btn-cookie-accept {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--white);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

.btn-cookie-accept:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============================================
   Responsive — Tablet (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 70px 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 160px;
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ============================================
   Responsive — Mobile (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 56px 0;
        --header-h: 64px;
    }

    /* Mobile Nav */
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--primary-xdark);
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px 24px;
        gap: 0;
        transform: translateX(100%);
        transition: transform var(--t-normal);
        overflow-y: auto;
    }

    .nav.open {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 16px 0;
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.80);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--white);
        background: transparent;
    }

    .nav-cta {
        width: 100%;
        margin-top: 24px;
        text-align: center;
        font-size: 1rem;
    }

    .lang-switcher {
        margin-top: 20px;
    }

    /* Hero */
    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero::after {
        height: 48px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* About */
    .about-stats {
        flex-direction: column;
    }

    /* Contact */
    .contact-form {
        padding: 24px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
    }

    /* Cookie */
    .cookie-banner {
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

/* ============================================
   Consent validation
   ============================================ */
.field-error {
    margin-top: 6px;
    font-size: 0.82rem;
    color: #c0392b;
}

.field-invalid .form-control {
    border-color: #c0392b;
    outline: none;
}

.field-invalid #consent {
    outline: 2px solid #c0392b;
    outline-offset: 2px;
    border-radius: 3px;
}

/* ============================================
   Footer Legal Links
   ============================================ */
.footer-legal-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.40);
    text-decoration: none;
    transition: color var(--t-fast);
    white-space: nowrap;
}

.footer-legal-links a:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   Legal Pages (Privacidade / Termos)
   ============================================ */
.legal-page {
    padding: var(--section-padding);
    background: var(--white);
}

.legal-content {
    max-width: 760px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 36px;
    margin-bottom: 12px;
}

.legal-content p,
.legal-content li {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:hover {
    color: var(--primary-dark);
}

.legal-back {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-border);
}
