/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 635px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* --header-height should be defined in header-footer.css or globally */
    margin-top: calc(-1 * var(--header-height)); /* Compensa el espacio del header */
    padding-top: var(--header-height);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1150px;
    /* Using clamp for responsive padding */
    padding: 0 clamp(20px, 5%, 40px);
    /* --light-text and --text-shadow should be defined globally */
    color: var(--light-text);
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: clamp(15px, 3vh, 20px);
    text-shadow: var(--text-shadow);
    line-height: 1.2;
}

.hero-content h1 span {
    /* --primary-color should be defined globally */
    color: var(--primary-color);
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    text-shadow: var(--text-shadow);
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

.imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero {
        height: clamp(350px, 70vh, 550px);
    }
    
    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .hero-content p {
        font-size: clamp(1rem, 3vw, 1.3rem);
    }
}
@media (max-width: 480px) {
    /* This should ideally be defined in a global file */
    :root {
        --header-height: 60px;
    }
    
    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .hero-content p {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }
}


@media print {

    /* Consider moving print styles to a dedicated print.css */
    .hero {
        height: auto;
        margin-top: 0;
        padding-top: 20px;
    }
    
    .hero-content {
        color: #000;
        text-shadow: none;
    }
    
    .hero-content h1 span {
        color: #000;
        font-weight: bold;
    }
}

/* Estilos para la secciÃ³n de contacto - Refactored for uniqueness */
.contacto-section {
    text-align: center;
    padding: 80px 20px;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.contacto-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    opacity: 0.8;
}

.contacto-title {
    font-size: 2.8rem;
    color: #222;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.contacto-title:after {
    content: "";
    display: block;
    width: 100px;
    height: 4px;
    background-color: #ff0000;
    margin: 15px auto 0;
}

.contacto-description {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Contenedor de tarjetas de redes sociales - Refactored */
.contacto-social-cards-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Tarjetas de redes sociales - Refactored */
.contacto-social-card {
    background: #fff;
    padding: 30px 25px;
    width: 260px; /* Consider making this more flexible with flex-basis */
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* Ensure cards grow/shrink appropriately */
    flex-grow: 1;
    flex-basis: 260px; /* Suggestion for better responsiveness */
    max-width: 280px; /* Limit max width */
}
/* Adjust flex-basis for smaller screens if needed */
@media (max-width: 600px) {
    .contacto-social-card {
        flex-basis: 100%; /* Stack cards on very small screens */
        max-width: 320px; /* Keep a max width even when stacking */
    }
}


.contacto-social-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: all 0.3s ease;
}

.contacto-social-card:nth-child(1):before { background-color: #1877F2; } /* Facebook */
.contacto-social-card:nth-child(2):before { background-color: #E4405F; } /* Instagram */
.contacto-social-card:nth-child(3):before { background-color: #25D366; } /* WhatsApp */
.contacto-social-card:nth-child(4):before { background-color: #D44638; } /* Mail - Google's old red */


.contacto-social-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.contacto-social-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    transition: all 0.3s ease;
}

.contacto-social-card:hover i {
    transform: scale(1.1);
}

.contacto-social-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
}

.contacto-social-card p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Icon colors (kept for consistency, ideally could use a data attribute or specific classes) */
.contacto-social-card:nth-child(1) i { color: #1877F2; } /* Facebook */
.contacto-social-card:nth-child(2) i { color: #E4405F; } /* Instagram */
.contacto-social-card:nth-child(3) i { color: #25D366; } /* WhatsApp */
.contacto-social-card:nth-child(4) i { color: #D44638; } /* Mail */


/* Contenedor de mapa - LEFT UNTOUCHED as requested */
.map-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 500px;
    margin: 60px auto;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.map-marker {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 300px;
    backdrop-filter: blur(5px);
    border-left: 4px solid #ff0000;
    transition: all 0.3s ease;
}

.map-marker:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.map-marker i {
    font-size: 2rem;
    color: #ff0000;
    margin-right: 15px;
}

.company-name {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}
.company-name span {
    font-size: 18px;
}
.initial {
    font-weight: 700;
    color: #ff0000;
    font-size: 1.3rem;
}

/* Animation Classes (assuming keyframes are global) */
.fade-in {
    /* Base opacity handled by JS before adding class */
    /* opacity: 0; */
    /* animation: fadeIn 1s forwards; */
}

.slide-in-left {
    /* Base opacity/transform handled by JS before adding class */
    /* opacity: 0; */
    /* transform: translateX(-50px); */
    /* animation: slideInLeft 1s forwards; */
}

.slide-in-right {
    /* Base opacity/transform handled by JS before adding class */
    /* opacity: 0; */
    /* transform: translateX(50px); */
    /* animation: slideInRight 1s forwards; */
}

/* Removed @keyframes fadeIn, slideInLeft, slideInRight assuming they are defined globally */


/* Media Queries - Updated selectors for contact section */
@media (max-width: 992px) {
    .hero-content {
        padding-inline: 100px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    .contacto-social-cards-container {
        gap: 20px;
    }

    .contacto-social-card {
        /* Re-evaluating width for flexibility */
         width: calc(50% - 10px); /* Two cards per row with gap */
         max-width: none; /* Remove max-width here to allow calc */
        flex-basis: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .hero {
        height: 500px;
    }

    .hero-content {
        padding-inline: 50px;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .contacto-title {
        font-size: 2.2rem;
    }

    .contacto-description {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }

    .contacto-social-cards-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .contacto-social-card {
        width: 100%;
        max-width: 320px; /* Limit width when stacked */
        flex-basis: auto; /* Auto basis when stacked */
    }

    .map-container {
        height: 400px;
        width: 95%;
        margin: 40px auto;
    }

    .map-marker {
        bottom: 15px;
        left: 15px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 400px;
    }

    .hero-content {
        padding-inline: 20px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .contacto-section {
        padding: 60px 15px;
    }

    .contacto-title {
        font-size: 1.8rem;
    }

    .contacto-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .contacto-social-card {
        padding: 20px 15px;
    }

    .contacto-social-card h3 {
        font-size: 1.4rem;
    }

    .contacto-social-card p {
        font-size: 0.95rem;
    }

    .map-container {
        height: 350px;
        margin: 30px auto;
    }

    .map-marker {
        left: 50%;
        transform: translateX(-50%); /* Center marker on small screens */
        bottom: 15px;
        max-width: 250px;
    }

    .map-marker:hover {
        transform: translateX(-50%) translateY(-3px); /* Maintain centering on hover */
    }

    .company-name {
        font-size: 0.95rem;
    }

    .company-name span {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .contacto-title {
        font-size: 1.6rem;
    }

    .contacto-description {
        font-size: 0.9rem;
    }

    .contacto-social-card i {
        font-size: 2.5rem;
    }

    .map-container {
        height: 300px;
    }
    .map-marker {
        max-width: 220px; /* Further limit marker width */
    }
}