:root {
    --primary-green: #2d5a27;
    --light-green: #7ca54d;
    --earth-brown: #5d4037;
    --slate-gray: #455a64;
    --crisp-white: #f5f7f5;
    --dark-overlay: rgba(0, 0, 0, 0.4);
    --glass: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--crisp-white);
    scroll-behavior: smooth;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-green);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-green);
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--slate-gray);
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary-green);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px;
    background: linear-gradient(var(--dark-overlay), var(--dark-overlay)),
        url('https://images.unsplash.com/photo-1584479898061-15742e14f50d?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 900px;
    padding: 2rem;
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 3px 6px 15px rgba(0, 0, 0, 0.7),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
    margin-right: 1rem;
}

.btn-primary:hover {
    background-color: var(--light-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 90, 39, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-green);
}

/* About Section */
.about {
    padding: 8rem 0;
    background-color: white;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    text-align: left;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--slate-gray);
    margin-bottom: 1.5rem;
}

.about-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.about-list li {
    font-size: 1.1rem;
    padding: 0.8rem 0;
    color: var(--slate-gray);
}

/* Services */
.services {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--light-green);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.5rem;
}

.service-card p {
    padding: 0 1.5rem 2rem;
    color: var(--slate-gray);
}

/* Projects Featured */
.projects {
    background-color: #f0f3f0;
    padding: 8rem 0;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 4rem;
}

.project-img img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.project-info {
    padding: 4rem;
}

.project-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.philosophy {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 0;
}

.philosophy blockquote {
    font-style: italic;
    font-size: 1.8rem;
    color: var(--slate-gray);
}

/* Contact */
.contact {
    padding: 8rem 0;
}

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 4rem;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.contact-card h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.contact-card p {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--slate-gray);
}

form {
    display: grid;
    gap: 1.5rem;
}

input,
textarea {
    padding: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

textarea {
    height: 150px;
    resize: none;
}

select {
    padding: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

select option {
    padding: 1rem;
}

.whatsapp-link {
    text-align: center;
    margin-top: 2rem;
}

.whatsapp-link a {
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
}

/* Hero Enhancements */
.hero-subtitle {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-badges .badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--slate-gray);
    margin-top: -2rem;
    margin-bottom: 3rem;
}

/* Before/After Gallery */
.before-after-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Project Gallery */
.project-image-single {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-image-single:hover {
    transform: scale(1.02);
}

.before-after-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.before,
.after {
    position: relative;
    overflow: hidden;
}

.before img,
.after img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.before:hover img,
.after:hover img {
    transform: scale(1.05);
}

.label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.gallery-item h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.5rem;
}

.gallery-item p {
    padding: 0 1.5rem 2rem;
    color: var(--slate-gray);
}

/* Full Width CTA */
.full-width-cta {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    text-align: center;
    padding: 4rem 3rem;
    border-radius: 30px;
    margin-top: 4rem;
}

.full-width-cta h3 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.full-width-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* Testimonials */
.testimonials {
    padding: 8rem 0;
    background-color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.testimonial-card {
    background: var(--crisp-white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-left: 4px solid var(--light-green);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

.client-name {
    font-weight: 600;
    color: var(--primary-green);
    font-size: 1rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 5px 30px rgba(37, 211, 102, 0.6);
    }

    100% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Footer */
footer {
    background-color: var(--primary-green);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {

    /* Container adjustments */
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
        /* Reducido de 1.5rem para evitar colisiones en el header */
    }

    /* Hero section mobile */
    .hero {
        padding-top: 120px;
        /* Aumentado de 80px para evitar que el header cubra el título */
        min-height: 80vh;
        background-attachment: scroll;
        display: flex;
        align-items: flex-start;
        /* Alineado arriba para mayor control */
        padding-bottom: 4rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        /* Reducido de 2rem para asegurar que quepa */
        line-height: 1.2;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        letter-spacing: 0;
        /* Reset de letter-spacing para mejor legibilidad */
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badges {
        gap: 0.5rem;
        margin-top: 2rem;
    }

    .hero-badges .badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }

    /* Section spacing */
    .services,
    .projects,
    .testimonials,
    .contact,
    .about {
        padding: 4rem 0;
    }

    /* Section titles */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-top: -1rem;
        margin-bottom: 2rem;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card img {
        height: 200px;
    }

    .service-card h3 {
        font-size: 1.3rem;
        padding: 1rem 1rem 0.5rem;
    }

    .service-card p {
        font-size: 0.95rem;
        padding: 0 1rem 1.5rem;
    }

    /* Projects section */
    .project-item {
        grid-template-columns: 1fr;
    }

    .project-info {
        padding: 2rem 1.5rem;
    }

    .project-info h3 {
        font-size: 1.5rem;
    }

    .before-after-gallery {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .before-after-container {
        grid-template-columns: 1fr;
    }

    .before img,
    .after img {
        height: 200px;
    }

    .project-image-single {
        height: 220px;
    }

    /* Philosophy */
    .philosophy blockquote {
        font-size: 1.3rem;
        padding: 0 1rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 2rem 1.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    /* Full width CTA */
    .full-width-cta {
        padding: 3rem 1.5rem;
        margin-top: 3rem;
    }

    .full-width-cta h3 {
        font-size: 1.6rem;
    }

    .full-width-cta p {
        font-size: 1rem;
    }

    /* Contact form - CRITICAL FIXES */
    .contact-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .contact-card h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .contact-card p {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Form elements mobile optimization */
    form {
        gap: 1rem;
    }

    input,
    textarea,
    select {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
        width: 100%;
    }

    textarea {
        height: 120px;
    }

    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 1.2rem;
        padding-right: 3rem;
    }

    .btn-primary {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .whatsapp-link {
        margin-top: 1.5rem;
    }

    .whatsapp-link a {
        font-size: 0.95rem;
    }

    /* About section */
    .about-content {
        padding: 0;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .about-list li {
        font-size: 0.95rem;
    }

    /* Mobile Menu styles */
    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 10px;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--primary-green);
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    nav ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: white;
        padding-top: 5rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        gap: 2rem;
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        text-align: center;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        margin-right: 0 !important;
    }

    /* WhatsApp float button mobile */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    /* Footer mobile */
    footer {
        padding: 2rem 0;
    }

    footer p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero {
        padding-top: 110px;
    }

    .hero h1 {
        font-size: 1.5rem;
        /* Aún más pequeño para pantallas muy estrechas */
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem 1rem;
    }

    .contact-card h2 {
        font-size: 1.5rem;
    }

    input,
    textarea,
    select {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    .full-width-cta h3 {
        font-size: 1.4rem;
    }

    .philosophy blockquote {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}