/* --- variables.css --- */
:root {
    /* Colors */
    --color-white: #FFFFFF;
    --color-black-graphite: #0C1F30;
    /* Dark Blue */
    --color-gold: #BD9F6B;
    --color-gold-text: #896A33;
    /* Darker for accessibility on light bg */
    /* New Gold */
    --color-gold-hover: #876831;
    /* Dark Gold/Bronze */
    --color-petrol: #0C1F30;
    /* Dark Blue */
    --color-beige: #F8E9CA;
    /* Light Beige */
    --color-bg-alt: #E8CA96;
    /* Alt Beige */
    --color-text-main: #0C1F30;
    --color-text-light: #F9F8F4;

    /* Typography */
    --font-heading: 'Montserrat', 'Poppins', sans-serif;
    --font-body: 'Inter', 'Lato', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Textures */
    --bg-gold-texture: url('../assets/cores/gold.jpg');
}
/* --- base.css --- */
/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--spacing-sm);
    font-weight: 300;
}

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

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

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

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

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

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

.text-gold {
    color: var(--color-gold);
}

.text-gold-dark {
    color: var(--color-gold-text);
}

.bg-petrol {
    background-color: var(--color-petrol);
    color: var(--color-white);
}

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

.bg-graphite {
    background-color: var(--color-black-graphite);
    color: var(--color-white);
}

/* Gold Line Separator */
.separator-gold {
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    background-image: var(--bg-gold-texture);
    background-size: cover;
    margin: var(--spacing-sm) auto;
}
/* --- layout.css --- */
/* Layout & Grids */

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('../assets/portfolio/hero-desktop.webp') no-repeat center center/cover;
    position: relative;
}

@media (max-width: 768px) {
    .hero {
        background-image: url('../assets/portfolio/hero-mobile.webp') !important;
    }
}

.hero-ba-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: ew-resize;
    /* Show resize cursor everywhere on the slider */
}

.hero-img-before,
.hero-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    user-select: none;
    /* Prevent image selection */
    -webkit-user-drag: none;
    /* Prevent image dragging */
    filter: brightness(0.5);
    /* Darken images directly to replace overlay */
}

.hero-img-after {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.hero-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    z-index: 20;
    /* ABOVE overlay and content */
    cursor: ew-resize;
}

.handle-line {
    width: 2px;
    height: 100%;
    background: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

/* Overlay removed - using filter on images instead */
.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
    pointer-events: none;
    /* Allow clicking through to slider */
}

.hero-content a,
.hero-content button {
    pointer-events: auto;
    /* Re-enable clicks on buttons */
}

/* Grid Systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

/* Differences Section */
.differences-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    text-align: center;
}

.difference-item {
    flex: 1;
    min-width: 200px;
}

.difference-icon {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xs);
}

.portfolio-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 28, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: var(--color-white);
}

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

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

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    position: relative;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    color: var(--color-petrol);
}

.process-step h3 {
    font-size: 1.25rem;
    /* Reduced from global h3 size */
    margin-bottom: 0.5rem;
}

.process-step:hover {
    transform: translateY(-10px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--color-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 2;
}

/* Case Study Cards (Side-by-Side) */
.case-study-card {
    display: flex;
    flex-direction: column;
    background: white;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .case-study-card {
        flex-direction: row;
        align-items: stretch;
        min-height: 400px;
    }

    .case-study-card:nth-child(even) {
        flex-direction: row-reverse;
    }

    .case-study-image {
        width: 55%;
        position: relative;
    }

    .case-study-content {
        width: 45%;
        padding: 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.case-study-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-study-card:hover .case-study-image img {
    transform: scale(1.05);
}

.case-study-content {
    padding: 2rem;
}

.case-study-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.spec-item h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.2rem;
}

.spec-item p {
    font-weight: 600;
    color: var(--color-text-main);
}

/* Footer */
.footer {
    background-color: var(--color-black-graphite);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        /* Ensure content clears the navbar */
        height: auto;
        /* Allow height to grow if content is tall */
        min-height: 100vh;
        padding-bottom: 2rem;
    }
}
/* --- components.css --- */
/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.btn-gold {
    background-color: var(--color-gold);
    background-image: var(--bg-gold-texture);
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    border: 1px solid transparent;
}

.btn-gold:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
    color: var(--color-white) !important;
}

.btn-outline {
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-gold);
    color: var(--color-white);
}

/* Service Cards */
.service-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--color-gold);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    margin-bottom: var(--spacing-xs);
}

/* Technical Cards (Dark/Transparent) */
.tech-card {
    padding: 2rem;
    text-align: center;
    border-radius: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: var(--transition-smooth);
}

.tech-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.tech-card h4 {
    margin-bottom: 1rem;
    color: inherit;
    /* Adapt to section background (dark/light) */
}

/* Force dark header for tech cards in light sections */
#diferencas .tech-card h4 {
    color: var(--color-petrol);
}

.tech-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Technical Cards Gallery (New Grid) */
.tech-card-gallery {
    background: var(--color-white);
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.tech-card-gallery:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tech-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.tech-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tech-card-gallery:hover .tech-img-wrapper img {
    transform: scale(1.05);
}

.tech-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tech-content h4 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.tech-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
    /* Darker gray for better readability */
    margin-top: auto;
    /* Push text to fill space evenly if needed or just align top */
    margin-top: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    background: var(--color-white);
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition-fast);
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    /* Scrolled state stays same as base or can be removed, keeping it for potential future animations but it's redundant now for bg */
    padding: 1rem 5%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--color-gold);
}

/* Mobile Menu Trigger */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden by default on mobile, toggled via JS */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    animation: pulse-whatsapp 4s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: #FFF;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    10% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        /* Avoid mobile nav overlap */
        right: 15px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}
