/* Reset & Base Styles */
:root {
    --color-bg: #FFFFFF; /* Minimalist pure white */
    --color-text: #222222; /* Darker for better contrast in minimal design */
    --color-text-light: #555555;
    --color-accent: #754E38; /* Corporate Terracotta/Brown */
    --color-accent-light: #8E634A;
    --color-white: #ffffff;
    --color-offwhite: #FAFAFA;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

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

.container {
    max-width: 1280px; /* New requested width */
    margin: 0 auto;
    padding: 0 5%;
}

/* Typography Classes */
.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--color-text);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--color-accent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--color-white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 5%;
}

.logo img {
    height: 90px;
    transition: var(--transition-smooth);
    filter: brightness(0) invert(1); /* White on transparent */
}

.navbar.scrolled .logo img {
    height: 75px; /* Shrinks when scrolled */
    filter: none; /* Corporate color when scrolled */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-links li a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-white); /* White on transparent */
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.navbar.scrolled .nav-links li a {
    color: var(--color-text); /* Dark when scrolled */
    text-shadow: none;
}

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

.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 2px;
    background-color: var(--color-white); /* White on transparent */
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.navbar.scrolled .burger div {
    background-color: var(--color-text); /* Dark when scrolled */
    box-shadow: none;
}

.nav-links.nav-active ~ .burger div {
    background-color: var(--color-text) !important;
    box-shadow: none;
}

/* Hero Section Fullscreen Video */
.hero {
    position: relative;
    min-height: 110vh; /* Increased from 100vh as requested */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-offwhite);
    margin: 0 auto 3rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

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

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

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 1px solid var(--color-accent);
}

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

/* Informational Sections (Sobre mí, Qué hacemos, Cómo hacemos) */
.info-section {
    padding: 8rem 0;
    background-color: var(--color-white);
}

.info-section.alt-bg {
    background-color: var(--color-offwhite);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.info-grid.reverse {
    direction: rtl;
}
.info-grid.reverse > * {
    direction: ltr;
}

.info-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.info-text p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-image {
    position: relative;
}

.info-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3/4;
}

/* Projects Section */
.projects {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Reduced from 380px to fix mobile overflow */
    gap: 0; /* Changed from 3rem to 0 to align without spaces */
}

.project-card {
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-offwhite);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/11;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-info {
    padding: 2rem 1.5rem;
    text-align: center;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.project-info span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
}

/* Contact Section Minimalist */
.contact {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

.contact-minimalist {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-minimalist h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    color: var(--color-accent);
}

.contact-minimalist-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-minimalist-links a {
    font-size: 1.5rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 5px;
    transition: var(--transition-smooth);
}

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

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-block h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info-block a {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

.contact-info-block a:hover {
    color: var(--color-accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.form-group input, .form-group textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Project Detail Pages - Premium Editorial Layout */
.editorial-hero {
    position: relative;
    height: 100vh; /* Full screen height for maximum impact */
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5rem;
    background-color: var(--color-text);
    color: var(--color-white);
    /* margin-top: 100px; removed to allow transparent navbar overlap */
    overflow: hidden;
}

.editorial-hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    z-index: 1;
}

.editorial-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.editorial-hero h1 {
    font-size: 4.5rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.editorial-hero .subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-offwhite);
}

.editorial-intro {
    padding: 8rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.editorial-intro p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.editorial-intro p:first-child {
    font-size: 1.8rem;
    color: var(--color-text);
    line-height: 1.6;
    font-family: var(--font-heading);
}

/* Varied Image Gallery */
.editorial-gallery {
    padding-bottom: 8rem;
}

.editorial-gallery-section {
    margin-bottom: 4rem;
}

.editorial-gallery-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-accent);
}

.gallery-row {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.gallery-row.full {
    grid-template-columns: 1fr;
}

.gallery-row.half {
    grid-template-columns: 1fr 1fr;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-row.full .gallery-item img {
    max-height: 80vh;
}
.gallery-row.half .gallery-item img {
    aspect-ratio: 4/5;
}
.gallery-row.third .gallery-item img {
    aspect-ratio: 1/1;
}

.back-link {
    display: inline-block;
    margin: 0 auto 5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 5px;
}
.back-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Services Accordion */
.services-header {
    padding-top: 150px;
    text-align: center;
    background-color: var(--color-bg);
    margin-bottom: 3rem;
}

.services-subtitle {
    color: var(--color-text-light);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto;
}

.services-accordion {
    max-width: 900px;
    margin: 0 auto 8rem;
    padding: 0 5%;
}

.accordion-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.accordion-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.accordion-header:hover {
    opacity: 0.8;
}

.accordion-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 2rem;
    flex-shrink: 0;
}

.accordion-title {
    font-size: 1.5rem;
    font-weight: bold;
    flex-grow: 1;
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-content-inner {
    padding: 1.5rem 0 2rem 120px; /* Aligns with text next to image */
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.accordion-btn {
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    font-size: 0.8rem;
}

/* Methodology Steps */
.methodology {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.methodology h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-bottom: 2rem;
}

.method-step {
    margin-bottom: 2rem;
}

.method-step h5 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.method-number {
    color: var(--color-accent-light);
    font-weight: bold;
    margin-right: 10px;
}

/* Services Summary */
.services-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.service-summary-card {
    text-align: center;
    padding: 2rem;
    background: var(--color-white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: var(--transition-smooth);
}

.service-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.service-summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.service-summary-card p {
    color: var(--color-text-light);
}

@media screen and (max-width: 768px) {
    .accordion-header {
        flex-direction: column;
        text-align: center;
    }
    .accordion-img {
        margin: 0 0 1rem 0;
        width: 150px;
        height: 150px;
    }
    .accordion-content-inner {
        padding: 1rem 0;
        text-align: center;
    }
    
    .contact-minimalist h2 {
        font-size: 2.5rem;
    }
    
    .contact-minimalist-links {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--color-text);
    color: var(--color-offwhite);
    font-size: 0.9rem;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 55px;
    height: 55px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(117, 78, 56, 0.3);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.whatsapp-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(117, 78, 56, 0.4);
    background-color: var(--color-text);
}

.whatsapp-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

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

.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .info-grid.reverse > * {
        direction: ltr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        background-color: var(--color-white);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transition: 0.5s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.05);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li a {
        font-size: 1.2rem;
        color: var(--color-text) !important; /* Force dark text in mobile white menu */
        text-shadow: none !important;
    }

    .burger {
        display: block;
        z-index: 1001;
    }
    
    .hero-content h1 {
        font-size: 2.8rem; /* Scaled down for mobile */
    }
    .section-title {
        font-size: 2.2rem;
    }
    
    .editorial-hero h1 {
        font-size: 3rem; /* Scaled down for mobile */
    }

    .gallery-row.half,
    .gallery-row.third {
        grid-template-columns: 1fr; /* Stack galleries on mobile */
    }
}
