/* General Body and Typography */
:root {
    --primary-color: #333; /* Dark color for text and elements */
    --secondary-color: #777; /* Lighter dark for secondary text */
    --accent-color: #B3865D; /* Gold/earthy tone for accents */
    --light-background: #F9F9F9;
    --dark-background: #222;
    --white: #FFFFFF;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: darken(var(--accent-color), 10%); /* Requires SASS or similar, use a fixed color */
    background-color: #a37952; /* Example darker shade */
    border-color: #a37952;
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo img {
    height: 60px; /* Adjust as needed */
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin: 0 15px;
}

.main-nav ul li a {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.header-social-icons a {
    font-size: 1.5rem;
    margin-left: 15px;
    color: var(--primary-color);
}

.header-social-icons a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    position: relative;
    margin-top: 100px; /* To account for fixed header */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-content .tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: var(--white);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden; /* For reveal effect */
}

section:nth-of-type(odd) {
    background-color: var(--light-background);
}

/* Philosophy Section */
.philosophy {
    text-align: center;
    padding: 80px 20px;
}

.philosophy h2 {
    font-size: 2.8rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.philosophy p {
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Projects Section */
.projects {
    background-color: var(--white);
}

.projects h2 {
    margin-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 3rem;
}

.project-item {
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.project-item:hover {
    transform: translateY(-10px);
}

.project-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.project-item:hover .project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.project-overlay h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.project-overlay p {
    font-size: 1rem;
    margin-bottom: 0;
}

.projects .btn-secondary {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--dark-background);
    color: var(--white);
    text-align: center;
}

.testimonials h2 {
    color: var(--white);
    margin-bottom: 3rem;
}

.testimonial-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    gap: 30px;
}

.testimonial-item {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    flex: 1; /* Allows flexible sizing */
    min-width: 300px; /* Minimum width before wrapping */
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-item h4 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.testimonial-item span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

/* Nosotros Section (About Us) */
.nosotros .container {
    text-align: center;
}

.nosotros h2 {
    margin-bottom: 3rem;
}

.nosotros-content {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    font-size: 1.15rem;
    line-height: 1.8;
}

.nosotros-content p strong {
    color: var(--accent-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Contacto Section */
.contacto {
    background-color: var(--accent-color);
    color: var(--white);
    text-align: center;
}

.contacto h2 {
    color: var(--white);
    margin-bottom: 2rem;
}

.contacto p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.contacto a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 500;
}

.contacto a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    max-width: 700px;
    margin: 3rem auto 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--primary-color);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color), 0.2); /* Soft focus ring */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background-color: #a37952; /* Example darker shade */
}

/* Footer */
footer {
    background-color: var(--dark-background);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-social-icons a {
    font-size: 1.8rem;
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social-icons a:hover {
    color: var(--accent-color);
}

.footer-info p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.footer-info p span {
    font-weight: 600;
}


/* Scroll Reveal Effect */
.reveal-effect {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-effect.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Responsive Design */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    header {
        flex-direction: column;
        padding: 15px 20px;
        position: static; /* Make header static on small screens for better flow */
        margin-top: 0;
        box-shadow: none;
    }

    .logo img {
        height: 50px;
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
    }

    .main-nav ul li {
        margin: 5px 10px;
    }

    .header-social-icons {
        margin-top: 10px;
    }

    .hero {
        margin-top: 0; /* No need for margin-top if header is static */
        height: 70vh;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content .tagline {
        font-size: 1.2rem;
    }

    .philosophy h2 {
        font-size: 2.2rem;
    }

    .testimonial-item {
        max-width: 100%;
    }

    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    p {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content .tagline {
        font-size: 1rem;
    }

    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr; /* Stack columns on very small screens */
    }

    .testimonial-slider {
        flex-direction: column;
    }

    .testimonial-item {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }

    .main-nav ul li {
        margin: 5px 7px;
    }

    .logo img {
        height: 40px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .tagline {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .philosophy p {
        font-size: 1rem;
    }

    .service-card {
        padding: 30px;
    }

    .contact-form {
        padding: 20px;
    }
}