/* ==========================================================================
   CSS Variables & Themes
   ========================================================================== */
   :root {
    /* Light Theme (Default) */
    --bg-main: #f0f0f0;
    --bg-card: #ffffff;
    --text-main: #1e1a53;
    --text-muted: #4e4b7b;
    --accent: #f7ce93;
    --accent-hover: #e3b778;
    --border-color: #dddddd;
    
    /* Specific overrides for light mode */
    --logo-sub-color: #d97706; /* Darker orange for better readability */
    --hero-overlay-start: rgba(247, 206, 147, 0.90);
    --hero-overlay-end: rgba(247, 206, 147, 0.70);
    --hero-text-color: #1e1a53;
    --hero-sub-color: #4e4b7b;
    --hero-btn-bg: #ffffff;
    --hero-btn-text: #1e1a53;
    
    /* Shared */
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-main: 'Poppins', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
}

[data-theme="dark"] {
    --bg-main: #1e1a53;
    --bg-card: #25215d;
    --text-main: #f0f0f0;
    --text-muted: #c5c2e2;
    --border-color: #353075;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
    
    /* Specific overrides for dark mode */
    --logo-sub-color: #f7ce93;
    --hero-overlay-start: rgba(30, 26, 83, 0.8);
    --hero-overlay-end: rgba(30, 26, 83, 0.5);
    --hero-text-color: #ffffff;
    --hero-sub-color: #e0e0e0;
    --hero-btn-bg: #f7ce93;
    --hero-btn-text: #1e1a53;
}

/* ==========================================================================
   Reset & Basics
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: #1e1a53; /* Text in accent buttons always dark for contrast */
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: #1e1a53;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(240, 240, 240, 0.85); /* Will adjust based on scroll/theme */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

[data-theme="dark"] .header {
    background-color: rgba(30, 26, 83, 0.85);
}

.header.scrolled {
    box-shadow: var(--shadow);
    border-bottom-color: var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo-img {
    height: 40px;
    width: auto;
}

.footer-logo-img {
    height: 45px;
    width: auto;
}

/* Theme based logo toggle */
.dark-mode-logo {
    display: none;
}

[data-theme="dark"] .light-mode-logo {
    display: none;
}

[data-theme="dark"] .dark-mode-logo {
    display: block;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo-sub {
    font-size: 0.9rem;
    color: var(--logo-sub-color);
    font-weight: 500;
    display: none; /* Hidden on very small screens */
}

@media (min-width: 576px) {
    .logo-sub {
        display: inline-block;
    }
}

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

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--bg-card);
}

.burger-menu {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    /* Imagem de fallback para mobile (e enquanto o vídeo carrega) */
    background-image: url('assets/Imagens/hero/d.villa.png');
    background-size: cover;
    background-position: center;
    margin-top: 0;
    overflow: hidden; /* Garante que o vídeo não ultrapasse a secção */
}

/* Vídeo de fundo */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

/* Em mobile: esconde o vídeo e usa apenas a imagem estática (mais leve) */
@media (max-width: 768px) {
    .hero-video {
        display: none;
    }
    .hero {
        background-attachment: scroll; /* Evita bug de parallax em iOS */
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--hero-text-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--hero-sub-color);
}

.hero .btn-primary {
    background-color: var(--hero-btn-bg);
    color: var(--hero-btn-text);
}

.hero .btn-primary:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    background-color: var(--hero-btn-bg); /* Keep it the same but pop out */
}

/* ==========================================================================
   Brands Marquee
   ========================================================================== */
.brands-marquee {
    background-color: var(--bg-card); /* Restaurado para a cor do tema original */
    padding: 30px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    animation: marquee 30s linear infinite;
}

.marquee-content img {
    height: 70px; /* Aumentado para compensar o padding interior (border-box) */
    width: 160px; /* Aumentado para compensar o padding interior */
    padding: 12px 20px; /* Espaço para o fundo branco */
    border-radius: var(--radius); /* Cantos arredondados */
    background-color: transparent; /* Fundo transparente de base */
    object-fit: contain;
    opacity: 0.6;
    margin: 0 20px; /* Margem ligeiramente reduzida devido ao padding */
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Tema Claro: Logos ficam a preto (opacidade torna-os cinza escuro) */
    filter: brightness(0); 
}

/* Tema Escuro: Logos ficam a branco (opacidade torna-os cinza claro) */
[data-theme="dark"] .marquee-content img {
    filter: brightness(0) invert(1);
}

/* Hover: Restaura cor original, 100% visível, aumenta ligeiramente e adiciona fundo branco */
.marquee-content img:hover,
[data-theme="dark"] .marquee-content img:hover {
    opacity: 1;
    transform: scale(1.10); /* Zoom um pouco menor para compensar a caixa maior */
    filter: none;
    background-color: #ffffff; /* Fundo branco por trás do logo */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Sombra elegante */
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Services (Accordion)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.service-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.card-header {
    padding: 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: var(--bg-card);
    transition: var(--transition);
}

.card-header:hover {
    background-color: var(--bg-main);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.card-title {
    flex-grow: 1;
    font-size: 1.2rem;
    font-weight: 600;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.service-card.active .accordion-icon {
    transform: rotate(180deg);
}

.card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: var(--bg-main); /* Slight contrast to card header */
}

.sub-service {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
}

.sub-service h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.sub-service p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Portfolio
   ========================================================================== */
.portfolio-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 60px; /* Espaço nas laterais para que as setas não fiquem sobre as fotos */
}

.portfolio-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.portfolio-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    flex: 0 0 auto;
    scroll-snap-align: start;
    height: 320px; /* Altura uniforme para manter o slider alinhado */
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: var(--accent);
    color: #1e1a53;
}

.slider-btn.left {
    left: 0;
}

.slider-btn.right {
    right: 0;
}

.portfolio-item img {
    width: auto;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(30, 26, 83, 0.9), rgba(30, 26, 83, 0.4));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    opacity: 0;
    transition: all 0.4s ease;
    padding: 20px; /* Evita que o texto encoste nos limites laterais */
    text-align: center;
}

.portfolio-overlay i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-overlay span {
    font-size: 1.2rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay i,
.portfolio-item:hover .portfolio-overlay span {
    transform: translateY(0);
}

/* ==========================================================================
   Impact / Numbers Section
   ========================================================================== */
.impact-section {
    background-color: var(--bg-card); /* Mesma cor de base para não haver quebra abrupta, ou pode ter um leve gradiente */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 60px 0;
}

[data-theme="dark"] .impact-section {
    background-color: #25215d; /* Para combinar com o card principal */
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.impact-card {
    padding: 20px;
    transition: var(--transition);
}

.impact-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.impact-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.impact-card h3 span.counter {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

.impact-card > span {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 992px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .impact-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   About Us
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.about-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.about-content strong {
    color: var(--text-main);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-card {
    background-color: var(--bg-card);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

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

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(247, 206, 147, 0.2);
}

.char-counter {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-success {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    border-radius: var(--radius);
    color: #27ae60;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.form-success i {
    font-size: 2rem;
}

.form-success.hidden {
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 10px;
}

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

.footer-contact-info li {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-contact-info i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.map-container {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(30, 26, 83, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.map-btn {
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.map-container:hover .map-overlay {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.livro-reclamacoes-container {
    margin-top: 30px;
    display: inline-block;
}

.livro-reclamacoes-img {
    height: 40px;
    width: auto;
    border-radius: 4px;
    transition: var(--transition);
}

.livro-reclamacoes-img:hover {
    transform: scale(1.05);
}

/* Fallback shown if image fails */
.livro-reclamacoes-container a {
    display: flex;
    flex-direction: column;
}
.livro-fallback {
    display: none;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
img.livro-reclamacoes-img[alt]:not([src]),
img.livro-reclamacoes-img:not([src]) + .livro-fallback {
    display: inline-block;
}

/* Social Media Icons */
.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.social-icon-link:hover {
    background-color: var(--accent);
    color: #1e1a53;
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(247, 206, 147, 0.3);
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.floating-whatsapp.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-5px) scale(1.05);
    color: white;
}

/* ==========================================================================
   RGPD & Cookies
   ========================================================================== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 5px;
    cursor: pointer;
    transform: scale(1.2);
}

.checkbox-group label {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-muted);
}

.privacy-link {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-banner {
    position: fixed;
    bottom: 0; /* Alinhado ao fundo */
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: transform 0.5s ease-in-out; /* Transição alterada para transform */
    border-top: 1px solid var(--border-color);
    transform: translateY(100%); /* Esconde 100% do banner para baixo */
}

.cookie-banner.visible {
    transform: translateY(0); /* Mostra o banner subindo-o totalmente */
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    gap: 20px;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    flex: 1;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Modals (Legal) */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.legal-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-content h2 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.8rem;
    padding-right: 30px;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-body p {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    .cookie-buttons .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        position: relative;
    }
    
    .burger-menu {
        display: block;
        z-index: 1002;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        padding: 50px 30px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1001;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.35rem;
        padding: 12px 0;
        display: block;
    }
    
    .nav-actions {
        flex-direction: column;
        margin-top: 30px;
        width: 100%;
    }
    
    .btn-outline {
        width: 100%;
        text-align: center;
    }
    
    .about-grid, .portfolio-grid, .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Font increases for mobile readability */
    .hero-title {
        font-size: 3.2rem;
        line-height: 1.15;
        margin-bottom: 25px;
    }
    
    .hero-subtitle {
        font-size: 1.35rem;
        line-height: 1.6;
        margin-bottom: 35px;
    }
    
    .hero .btn-large {
        font-size: 1.15rem;
        padding: 14px 28px;
    }
    
    .section-desc,
    .about-content p {
        font-size: 1.15rem;
        line-height: 1.6;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .sub-service h4 {
        font-size: 1.15rem;
    }
    
    .sub-service p {
        font-size: 1.05rem;
    }
    
    .contact-form label {
        font-size: 1.05rem;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 1.05rem;
    }
    
    .footer-col h3 {
        font-size: 1.3rem;
    }
    
    .footer-contact-info li {
        font-size: 1.05rem;
    }

    .portfolio-slider-container {
        padding: 0; /* Remove padding lateral no mobile/tablet */
    }
    
    .slider-btn {
        display: none; /* Esconde setas de navegação (usar swipe de ecrã) */
    }

    .portfolio-item {
        flex: 0 0 75%; /* Mostra 1 item completo e o início do próximo */
        height: 280px; /* Reduz altura proporcionalmente para tablets */
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .portfolio-overlay span {
        font-size: 1.05rem; /* Evita quebra de texto em ecrãs estreitos */
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.6rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        line-height: 1.5;
        margin-bottom: 30px;
    }
    
    .hero .btn-large {
        font-size: 1.15rem;
        padding: 14px 24px;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .contact-card {
        padding: 30px 20px;
    }

    .portfolio-item {
        flex: 0 0 88%; /* Mostra quase 1 por 1 com uma aba do seguinte */
        height: 320px; /* Aumenta a foto e dá altura para o texto caber sem problemas */
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
