:root {
    --primary-color: #2c3e50;
    --secondary-color: #27ae60;
    --accent-color: #e67e22;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --header-bg-scrolled: rgba(255, 255, 255, 0.95);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    padding: 10px 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 10px 20px;
    border-radius: 36px;
    transition: all var(--transition-speed) ease;
}

/* Initial state (on hero) */
header.transparent .navbar {
    background: transparent;
    margin-top: 20px;
    color: var(--white);
}

header.transparent .nav-links a {
    color: var(--white);
}

/* Scrolled state */
header.scrolled .navbar {
    background: var(--header-bg-scrolled);
    margin-top: 10px; /* Slightly less margin or keep it */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

header.scrolled .nav-links a {
    color: var(--primary-color);
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    background: url('images/heroimage.jpeg') no-repeat center center/cover;
    background-position: bottom;
    background-attachment: fixed; /* Parallax effect */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    padding: 0 20px;

    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    z-index: -1;
    opacity: 0;
    animation: fadeInOverlay 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    gap: 200px;
}

.hero-text-left {
    flex: 1;
    text-align: center;
}

.hero-text-right {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 1s ease-out forwards;
    animation-delay: 2s; /* Starts after h1 lines */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}

.hero-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
}

.line-1 { animation-delay: 0.8s; }
.line-2 { animation-delay: 1.2s; }
.line-3 { animation-delay: 1.6s; }

@keyframes fadeInOverlay {
    to { opacity: 1; }
}

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

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 30px;
    font-weight: bold;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.btn:hover {
    background-color: #219150;
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 80px 20px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-align: center;
}

/* Services Home Section */
.services-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 80px 100px;
}

.services-text {
    text-align: center;
}

.services-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.services-text p {
    margin-bottom: 20px;
    color: #555;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed);
    position: relative;
    height: 300px;

    /* Initial state for animation */
    opacity: 0;
    transform: translateX(300px);
}

.service-card.animate {
    animation: slideInRight 1s ease-out forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered delays for service cards */
.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.5s; }
.service-card:nth-child(3) { animation-delay: 0.7s; }
.service-card:nth-child(4) { animation-delay: 1.0s; }
.service-card:nth-child(5) { animation-delay: 1.0s; }
.service-card:nth-child(6) { animation-delay: 1.2s; }

.service-card:hover {
    transform: translateY(-5px) !important;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover img {
    transform: scale(0.9);
}

.service-card h4 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 10px;
    text-align: center;
    font-size: 1rem;
}

/* About Preview */
.about-preview {
    background-color: var(--light-bg);
    text-align: center;
    border-radius: 20px;
    
}

.about-preview p {
    margin: 0 auto 30px;
    max-width: 800px;
}

/* Projects Slider */
.projects-slider-section {
    overflow: hidden;
    padding: 50px 0;
    background: var(--white);
}

.slider-track {
    display: flex;
    width: calc(300px * 10); /* Adjust based on number of slides */
    animation: scroll 20s linear infinite;
}

.slide {
    width: 500px;
    height: 300px;
    margin: 0 15px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.slide:hover {
    transform: scale(1.2);
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.slide-content span {
    color: var(--white);
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.5s ease;
}
.slide:hover .slide-content span {
    font-size: 1.5rem;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 5 - 150px)); } /* Adjust based on content */
}

/* Contact Preview */
.contact-preview {
    text-align: center;
    background: linear-gradient(rgba(44, 62, 80, 0.6), rgba(44, 62, 80, 0.6)), url('images/listoscomenzar.jpeg') center/cover;
    color: var(--white);
    border-radius: 36px;
    margin: 40px auto;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.contact-preview p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 30px;
}

.contact-preview h2 {
    color: var(--white);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-logo img {
    max-width: 150px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff; /* Ensure logo is visible if transparent */
    padding: 5px;
}

.footer-logo p {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links h3,
.footer-social h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.about-detail{
    max-width: 1200px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll; /* Fix para móviles: desactiva parallax para asegurar que la imagen se vea */
        background-position: center; /* Centrar la imagen en móviles para mejor encuadre */
    }

    .services-home {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text-left, .hero-text-right {
        text-align: center;
        align-items: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Page Specifics */
.page-header {
    height: 50vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/paisaje2.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}
.contacto-header{
    height: 60vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/fondocontacto.jpeg') center/cover;
}

.nosotros-header {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('images/nosotros.png') center/cover;
}

.services-header {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('images/servicios.jpg') center/cover;
}
/* New Services Layout */
.services-hero-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.square-hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .square-hero-image {
        width: 90vw;
        height: 90vw;
    }
}

/* Modificado para incluir el contenedor wrapper y el texto overlay */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 120vh;
    background-color: #000; /* Fondo negro */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.square-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Opacidad para oscurecer y dejar ver el fondo negro en wrapper */
    display: block;
}

.services-overlay-text {
    position: sticky; /* Sticky para el efecto solicitado */
    top: 50vh; /* Se pega al medio de la pantalla */
    transform: translateY(-50%); /* Ajuste fino del centro */
    width: 100%;
    text-align: center;
    color: var(--white);
    pointer-events: none;
    z-index: 5;
    /* Necesario para asegurarnos que sticky tenga espacio para moverse dentro del contenedor */
    display: flex;
    justify-content: center;
}

.services-overlay-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .hero-image-wrapper {
        width: 90vw;
        height: 90vw;
    }
    
    .services-overlay-text h1 {
        font-size: 2rem;
    }
}

/* Fin modificaciones hero services */

.service-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
    padding-bottom: 60px;
    border-bottom: 1px solid #eee;
}

.service-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.service-item.reverse {
    flex-direction: row-reverse;
}

.service-content {
    flex: 1;
}

.service-image {
    flex: 1;
    height: 700px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.service-item h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

@media (max-width: 900px) {
    .service-item, .service-item.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .service-image {
        width: 100%;
        height: 300px;
    }
}



.service-item {
    margin-bottom: 60px;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

.service-item:last-child {
    border-bottom: none;
}

.service-item h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
}

/* Contact Form & Map */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-form button {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

.services-logo {
    max-width: 150px;
    margin-bottom: 20px;
    display: inline-block;
}

/* Modern About Us Styles */
.about-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.about-intro p {
    font-size: 1.2rem;
    color: #555;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--secondary-color);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.team-section {
    background: var(--light-bg);
    padding: 80px 20px;
    margin-top: 60px;
    border-radius: 30px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--light-bg);
}

.team-member h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.team-member p {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modern Contact Styles */
.contact-wrapper {
    max-width: 1200px;
    margin: -100px auto 50px; /* Overlap header */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    position: relative;
    z-index: 10;
}

.contact-info {
    background: var(--primary-color);
    color: #fff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h2 {
    color: #fff;
    text-align: left;
    margin-bottom: 30px;
}

.info-item {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.contact-form-modern {
    padding: 50px;
}

.contact-form-modern h2 {
    text-align: left;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #219150;
}

.map-section {
    height: 400px;
    width: 100%;
    margin-bottom: -50px; /* Pull footer up slightly */
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        margin: -50px 20px 50px;
    }
    
    .contact-info {
        padding: 40px;
    }
    
    .contact-form-modern {
        padding: 40px;
    }
}


/* Projects Page Experience Section */
.experience-section {
    padding: 100px 40px;
    margin: 0 auto;
}
.experience-container {
    display: grid;
    grid-template-columns: 55% 42%;
    gap: 50px;
    align-items: center;
}
.experience-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 80vh;
    object-fit: cover;
}
.experience-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.experience-content > p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.8;
}
.location-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.location-item {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    transition: transform 0.3s ease;
}
.location-item:hover {
    transform: translateX(5px);
}
.location-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}
.location-item p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

@media (max-width: 900px) {
    .experience-container {
        grid-template-columns: 1fr;
    }
    .experience-image {
        order: -1;
        margin-bottom: 30px;
    }
}

/* Portfolio Gallery */
.portfolio-gallery {
    padding: 60px 20px;
    background-color: var(--light-bg);
}

.portfolio-gallery h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    height: 250px; /* Uniform height for grid */
    overflow: hidden;
}

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

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

.gallery-caption {
    padding: 20px;
    text-align: center;
}

.gallery-caption h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

/* --- Mobile Responsive & Hamburger Menu --- */

/* Hamburger Button Support */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Specific Media Queries for Mobile phones */
@media (max-width: 768px) {
    /* 1. Hamburger Menu Visibility */
    .hamburger {
        display: block;
    }

    /* Change Menu Colors for visibility based on header type */
    header.transparent .hamburger span {
        background-color: var(--white);
    }
    
    header.scrolled .hamburger span,
    header:not(.transparent) .hamburger span {
        background-color: var(--text-color);
    }

    /* Nav Links Mobile View */
    .nav-links {
        position: fixed;
        top: 0;
        right: -120%;
        height: 60vh;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding-top: 20px; /* Space for X button if needed, or just centering */
    }

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

    .nav-links a {
        color: var(--text-color) !important; /* Force dark text in menu */
        font-size: 1.4rem;
        margin: 10px 0;
    }

    /* Hamburger Animation for Active State */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
        background-color: var(--text-color); /* Ensure visible on white menu */
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
        background-color: var(--text-color);
    }
    
    /* Z-Index Fix ensure hamburger is above menu */
    .hamburger { z-index: 2000; }
    .nav-links { z-index: 1500; }

    /* 2. Smaller Header Title */
    .logo {
        font-size: 0.9rem; /* Smaller title */
        max-width: 100%;
    }

    /* 3. General H2 Smaller */
    h2 {
        font-size: 1.5rem;
    }

    /* 4. Proyectos: Experience Image 50vh */
    .experience-image img {
        height: 40vh;
        object-fit: cover;
    }
    
    /* 5. Servicios: Hero Margin Top */
    .services-hero-container {
        margin-top: 100px;
    }
    /* Fix for square hero image on mobile to fit nicely */
    .hero-image-wrapper {
        height: 300px;
    }
    .hero{
        height: 120vh;
    }

    /* 6. Index: Services Home tweaks */
    .services-home {
        width: 100%;
        padding: 40px 15px; /* Less padding */
        display: block; /* Stack flex/grid items */
    }
    
    .services-text {
        text-align: center;
        margin-bottom: 40px;
    }

    /* 7. Index: Services Cards 2 Columns */
    .services-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Force 2 columns */
        gap: 15px;
    }
    
    .service-card h4 {
        font-size: 0.9rem; /* Smaller text for cards */
        padding: 10px;
    }

    .service-card {
        height: auto;
    }

    /* 8. Index: Hero Text Right Margin Top */
    .hero-text-right {
        margin-top: 40px;
        padding-left: 0; /* Remove border padding from desktop style */
        border-left: none;
    }
    
    .hero-content {
        flex-direction: column;
        padding: 0 20px;
        margin-top: 40px;
    }
    
    .hero-text-left h1 {
        font-size: 2.5rem;
    }
    /* 1. Navbar Alignment Fix */

    .hamburger {
        flex-shrink: 0; /* Never shrink the button */
        margin-left: auto;
    }

    /* 2. Services Images Visibility Fix */
    .service-item, 
    .service-item.reverse {
        flex-direction: column !important; /* Stack vertical */
        display: flex;
    }

    .service-image {
        width: 100%;
        min-height: 400px; /* Ensure height for background images */
        height: auto !important; /* Allow growing */
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure the inline-styled image container behaves */
    .service-image img {
        display: block;
        width: 100%;
        height: auto;
    }
    .nosotros-header{
        height: 30vh;
    }
    .experience-content h2 {
    font-size: 2rem;
    }
    .contact-preview {
        height: 70vh;
    }
    .whatsapp-float{
        right: 15px;
        bottom: 15px;
    }
    
}


/* Animation Fixes for Mobile */

/* Define the vertical slide animation */
@keyframes slideInUpMobile {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .service-card {
        /* Override the horizontal offset to vertical offset */
        transform: translateY(50px) !important; 
        /* !important used here to ensure we override the desktop base style if conflicts arise, 
           though cascade order should handle it. Being safe. */
    }

    .service-card.animate {
        /* Switch to vertical animation */
        animation: slideInUpMobile 1s ease-out forwards;
    }
}

    .service-image {
        /* Disable fixed attachment on mobile to stop the "zoomed in" effect */
        background-attachment: scroll !important;
        /* Keep cover so it fits nicely */
        background-size: cover !important;
        /* Adjust positioning if needed */
        background-position: center center !important;
    }

