/* Variables */
:root {
    --color-bg: #F2F0E9;
    --color-text: #333333;
    --color-secondary: #777777;
    --color-accent: #D81B7D;
    --font-heading: 'Montserrat', 'Jost', 'Segoe UI', sans-serif;
    --font-accent: 'Playfair Display', 'IvyMode', serif;
    --font-body: 'Inter', 'Open Sans', 'Segoe UI', sans-serif;
    --spacing-unit: 1.5rem;
    --container-width: 1100px;
    --nav-height: 100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Better font rendering on Windows/Linux */
}

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

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    font-size: 5rem;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
}

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    position: relative;
    padding-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.2em;
}

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

.narrow-container {
    max-width: 800px;
}

.section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 18px 45px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 0;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.basic-gray-bg {
    background-color: #d0c5b5;
    /* Slightly darker than bg for contrast placeholders */
    width: 100%;
    height: 250px;
}

/* Header & Nav */
.main-header {
    background-color: var(--color-bg);
    /* Or transparent if over hero */
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(53, 64, 36, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    /* Adjust height as needed */
    width: auto;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg);
}

.hero-image-container {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 65%;
    height: 90vh;
    z-index: 1;
    border-radius: 1000px 1000px 0 0;
    /* Organic arch shape */
    overflow: hidden;
    opacity: 0.5;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    width: 100%;
    margin-left: 10%;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    height: 240px;
    /* Adjust size as needed */
    width: auto;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    line-height: 0.9;
    color: #D81B7D;
    /* Fuchsia logo color */
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #D81B7D;
    /* Fuchsia accent */
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
    max-width: 480px;
    margin-top: 2rem;
    font-weight: 300;
}

/* Animations & Effects */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.pulse-btn {
    animation: pulse 2s infinite;
}

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

    70% {
        box-shadow: 0 0 0 10px rgba(102, 0, 51, 0);
    }

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

.hero h1 {
    margin-bottom: 20px;
}

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

/* Philosophy Section */
.philosophy-text {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    line-height: 1.4;
    text-align: center;
    font-style: italic;
    color: var(--color-text);
}

/* Trayectoria (Editorial Style) */
.trayectoria .text-content {
    font-size: 1.1rem;
    line-height: 2;
    text-align: justify;
    column-count: 2;
    column-gap: 60px;
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .trayectoria .text-content {
        column-count: 1;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* Servicios (3D Grid) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /* Restored gap for 3D effect */
    border: none;
    perspective: 1000px;
}

.service-card {
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(136, 144, 99, 0.2);
    margin: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s;
    /* 3D Properties */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.service-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-color: var(--color-accent);
}

.service-card h3 {
    color: var(--color-accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
    transform: translateZ(20px);
    /* Parallax text */
}

.service-card p.enfoque-desc {
    transform: translateZ(10px);
    margin-bottom: 20px;
    font-weight: 500;
}

.enfoque-points {
    list-style: none;
    padding: 0;
    transform: translateZ(5px);
}

.enfoque-points li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-secondary);
}

.enfoque-points li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* Proyectos (Gallery 3D) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.project-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    /* Slight softening */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-item:hover {
    transform: scale(1.02) translateY(-5px);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-img {
    transition: transform 0.6s ease;
    height: 300px;
    /* Fixed height for consistency */
    object-fit: cover;
}

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

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.project-item:hover .project-info {
    transform: translateY(0);
}

.project-info h3 {
    margin-bottom: 5px;
    font-size: 1.4rem;
    color: #fff;
}

.project-info p {
    font-size: 0.9rem;
    color: #ddd;
    text-transform: uppercase;
}

/* Artículos Section */
.articulos {
    background-color: var(--color-bg);
}

.blog-list {
    margin-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-item {
    display: flex;
    flex-wrap: wrap;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    gap: 40px;
}

.blog-meta {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blog-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
}

.blog-content {
    flex: 1;
}

.blog-item-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: none;
    /* Editorial look */
    letter-spacing: 0;
}

.blog-item-title a {
    color: var(--color-text);
    transition: color 0.3s;
}

.blog-item-title a:hover {
    color: var(--color-accent);
}

.blog-excerpt {
    font-size: 1.05rem;
    color: var(--color-secondary);
    font-weight: 300;
    max-width: 600px;
}

.blog-action {
    display: flex;
    align-items: center;
}

.read-more {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--color-text);
    position: relative;
    padding-bottom: 5px;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

@media (max-width: 992px) {
    .blog-item {
        flex-direction: column;
        gap: 20px;
    }

    .blog-meta {
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }
}

/* Contact */
.contact-form {
    margin-top: 40px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--color-secondary);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
}

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

/* Footer */
.main-footer {
    background-color: #dcd0bf;
    /* Slightly darker */
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(53, 64, 36, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        padding: 20px 0;
        border-bottom: 1px solid rgba(53, 64, 36, 0.1);
        flex-direction: column;
        animation: slideDown 0.3s ease-out forwards;
    }

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

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .main-header .container {
        position: relative;
    }

    .mobile-toggle {
        display: block;
        width: 30px;
        height: 25px;
        position: relative;
        z-index: 1001;
    }

    .mobile-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--color-text);
        margin-bottom: 5px;
        transition: all 0.3s ease;
    }

    /* Hamburger to X animation */
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        /* Adjusted for visual balance */
    }

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

    h1 {
        font-size: 2.5rem;
    }
}

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

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