/* 
   Madri Pães Alimentos - Design System 
   Palette: Wine/Burgundy + Gold + Cream
*/

:root {
    /* Colors */
    --color-wine-900: #4a0d18;
    --color-wine-700: #671025;
    /* Primary Brand Color */
    --color-wine-600: #8a1c34;

    --color-gold-500: #C5A059;
    /* Accent */
    --color-gold-400: #dac085;

    --color-cream-100: #F9F7F2;
    /* Background Main */
    --color-cream-200: #ebe6db;

    --color-text-heading: #1a1a1a;
    --color-text-body: #4a4a4a;
    --color-white: #ffffff;

    /* Typography */
    --font-serif: 'Mate SC', serif;
    /* Headings only */
    --font-sans: 'Sora', sans-serif;
    /* Body, navigation, buttons, all UI */

    /* Spacing */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 4rem;
    /* 64px */
    --spacing-xl: 8rem;
    /* 128px */

    /* Global */
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-cream-100);
    color: var(--color-text-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-serif);
    color: var(--color-text-heading);
    font-weight: 400;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

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

.text-light {
    color: var(--color-white);
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.8);
}

.bg-cream {
    background-color: var(--color-cream-200);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.button--primary {
    background-color: var(--color-wine-700);
    color: var(--color-white);
    border: 1px solid var(--color-wine-700);
}

.button--primary:hover {
    background-color: var(--color-wine-900);
}

.button--outline-sm {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-wine-700);
    color: var(--color-wine-700);
    font-size: 0.85rem;
}

.button--outline-sm:hover {
    background-color: var(--color-wine-700);
    color: var(--color-white);
}

.button--text {
    background: transparent;
    color: var(--color-wine-700);
    font-weight: 600;
}

.button--text:hover {
    text-decoration: underline;
}

.button--full {
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-wine-900);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    /* Reduced from 1rem */
    transition: padding 0.3s ease;
}

.header.scrolled {
    padding: 0.25rem 0;
    /* Reduced from 0.5rem */
    box-shadow: var(--shadow-sm);
    background-color: rgba(74, 13, 24, 0.98);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: block;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin: -10px 0;
    /* Allow logo to be larger without pushing header height */
}

/* Remove old logo styles if not used, or keep for fallback */
/* .logo { ... } */

.nav__list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    /* Light text */
}

.nav__link:hover {
    color: var(--color-gold-500);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-white);
    /* White toggle */
    cursor: pointer;
}

/* Hero */
.hero {
    /* Padding header height + spacing */
    padding-top: 8rem;
    padding-bottom: var(--spacing-lg);
    /* Full fold background */
    min-height: 100vh;
    display: flex;
    align-items: center;

    background-image: url('../assets/images/hero-bg-final.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}



.hero__container {
    position: relative;
    z-index: 2;
    /* Remove grid, use flex/block */
    display: block;
    width: 100%;
}

.hero__content {
    max-width: 650px;
}

.eyebrow {
    display: block;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--color-wine-900);
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-wine-900);
}

.hero__text {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    color: var(--color-text-heading);
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: var(--color-wine-700);
}

.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-body);
    line-height: 1.7;
    margin-top: 1rem;
}

.text-body {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #4a4a4a;
}

.hero__actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Placeholders */
.image-placeholder {
    width: 100%;
    height: 300px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.image-placeholder--hero {
    height: 500px;
    background-color: #e0d8c8;
}

.image-placeholder--tall {
    height: 100%;
    min-height: 400px;
}

/* Highlights */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

.card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.card__image {
    height: 250px;
    width: 100%;
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__image .image-placeholder {
    height: 100%;
    border-radius: 0;
}

.card__content {
    padding: 1.5rem;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-wine-700);
}

.card__desc {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.5;
}

/* Portfolio & Tabs */
.tabs-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
    overflow-x: auto;
    padding-bottom: 10px;
    /* Scrollbar space if needed on mobile */
}

.tabs {
    display: flex;
    gap: 1rem;
}

.tab {
    background: none;
    border: none;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #888;
    border-bottom: 3px solid transparent;
    /* Thicker base */
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab.active,
.tab:hover {
    color: var(--color-wine-700);
    border-color: var(--color-gold-500);
    /* Border width is already defined above, changing color makes it visible */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Factory */
.factory__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.feature-list {
    margin-top: var(--spacing-md);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--color-wine-700);
    font-weight: 500;
}

.feature-list i {
    color: var(--color-gold-500);
    font-size: 1.25rem;
}

/* Business / B2B Section */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: transparent;
}

.feature-icon {
    font-size: 3rem;
    color: var(--color-wine-700);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* Contact */
.contact {
    background-color: var(--color-wine-700);
    color: white;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.contact__info {
    max-width: 500px;
}

.contact__info .section-title {
    margin-bottom: 1.5rem;
}

.contact__info>p {
    margin-bottom: 3rem;
    font-size: 1.15rem;
    line-height: 1.7;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--color-gold-500);
    font-size: 1.75rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* WhatsApp CTA Card */
.contact__cta {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.cta-icon {
    font-size: 4rem;
    color: #25D366;
    margin-bottom: 1.5rem;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.cta-title {
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
}

.cta-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.button--whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.button--whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

.button--large {
    padding: 1.25rem 3rem;
    font-size: 1.15rem;
}

/* Footer */
.footer {
    background-color: var(--color-wine-900);
    color: white;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer__links a:hover {
    color: var(--color-gold-500);
}

/* Responsive */
@media (max-width: 900px) {
    .header .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-cream-100);
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: var(--shadow-md);
    }

    .header .nav.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }

    .nav__list {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .nav__link {
        color: var(--color-wine-900);
    }

    .mobile-toggle {
        display: block;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__container,
    .factory__container,
    .contact__container,
    .grid--3 {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact__info {
        max-width: 100%;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-icon {
        font-size: 3rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .hero__image-wrapper.order-first {
        order: -1;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    /* WhatsApp green */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    /* Darker WhatsApp green */
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-float i {
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Side Panel Styles */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.side-panel-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: var(--color-cream-100);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-panel.active {
    transform: translateX(0);
}

.side-panel__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}

.side-panel__close:hover {
    background: #fff;
    transform: scale(1.1);
}

.side-panel__content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.side-panel__image-container {
    width: 100%;
    height: 300px;
    background-color: var(--color-gold-50);
}

.side-panel__image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-panel__info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-panel__title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-wine-900);
    line-height: 1.2;
}

.side-panel__desc {
    font-size: 1.1rem;
    color: var(--color-text-body);
    line-height: 1.6;
}

.side-panel__details {
    padding: 1.5rem;
    background-color: var(--color-cream-100);
    border-radius: 8px;
    border-left: 4px solid var(--color-gold-500);
}

.side-panel__details h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--color-wine-800);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.side-panel__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-panel__list li {
    padding: 0.25rem 0;
    font-size: 1rem;
    color: var(--color-text-heading);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-panel__list li::before {
    content: '';
    color: var(--color-gold-500);
    font-weight: bold;
}

@media (max-width: 480px) {
    .side-panel {
        max-width: 100%;
    }
}