:root {
    /* Color Palette - Based on Logo */
    --primary: #3D3D3D;
    --primary-light: #4a4a4a;
    --accent: #5CBCD5;
    --accent-hover: #7ACDE3;
    --text-dark: #3D3D3D;
    --text-light: #f5f5f5;
    --text-muted: #6b7280;
    --bg-light: #f8f9fa;
    --bg-dark: #2d2d2d;
    --white: #ffffff;
    --border: #e5e7eb;
    --gray-light: #B5B5B5;

    /* Typography */
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Spacing */
    --section-padding: 6rem 0;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Typography: Using Helvetica system font */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 7px 22px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-medium);
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Header / Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #5A5A5A;
    backdrop-filter: blur(10px);
    transition: all var(--transition-medium);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
}

.nav-logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-medium);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(61, 61, 61, 0.85) 0%, rgba(45, 45, 45, 0.9) 100%),
        url('../img/hero.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(201, 162, 39, 0.15);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 100%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    max-width: 710px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Value Props */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    border: 1px solid var(--border);
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
}

.value-card h4 {
    margin-bottom: 0.75rem;
}

.value-card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services-grid.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .services-grid.grid-2-cols {
        grid-template-columns: 1fr;
    }
}

.service-card {
    position: relative;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    border: 1px solid var(--border);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition-medium);
}

.service-card:hover::before {
    transform: scaleY(1);
}

/* Compact Value Cards */
.values-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.value-card-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.value-card-compact .value-icon {
    margin: 0;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.value-card-compact h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: #5A5A5A;
    margin-bottom: 1rem;
    line-height: 1;
    opacity: 0.55;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.service-link:hover {
    color: var(--accent);
    gap: 0.75rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-inner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.about-image-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    /* Escalar ligeramente para ocultar línea de borde del archivo original */
}

.about-image-overlay {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--accent);
    color: var(--primary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

.about-image-overlay .number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.about-image-overlay .label {
    font-weight: 600;
    font-size: 0.875rem;
}

.about-content h2 {
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.about-feature::before {
    content: '✓';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
    text-align: center;
    color: var(--white);
}

.cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-item p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all var(--transition-fast);
    background: var(--bg-light);
}

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

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image-overlay {
        position: relative;
        bottom: 0;
        right: 0;
        display: inline-block;
        margin-top: 1rem;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section {
        padding: 4rem 0;
    }

    /* Prevent image cropping on mobile */
    .about-image-main,
    .about-grid img,
    .service-detail-grid img,
    .carousel-card img,
    .about-image img {
        height: auto !important;
        object-fit: initial !important;
        max-height: none !important;
    }
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 75px;
    height: 75px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition-medium);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: var(--white);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Page Header */
.page-header {
    padding: 10rem 0 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    filter: saturate(15%);
    z-index: -1;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    z-index: 3;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.header-nosotros::before {
    background-image: url('../img/nosotros.jpg');
}

.header-proyectos::before {
    background-image: url('../img/proyectos.jpg');
}

.header-servicios::before {
    background-image: url('../img/servicios.jpg');
}

.header-contacto::before {
    background-image: url('../img/contacto.jpg');
}

/* Service Detail Grid */
.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    /* Better vertical alignment for desktop */
}

@media (max-width: 991px) {
    .service-detail-grid {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .service-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.service-image-wrapper {
    margin-bottom: 0;
    /* Handled by grid gap */
}

.service-image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    box-shadow: var(--shadow-xl);
}

@media (min-width: 769px) {
    .service-reversed .service-image-wrapper {
        grid-column: 1;
        grid-row: 1;
    }

    .service-reversed .service-detail-content {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .service-detail-content h2 {
        margin-bottom: 1rem;
    }

    .service-image-wrapper {
        margin-top: 1rem;
        /* Space below content in mobile */
    }

    .service-image-wrapper img {
        height: 300px;
        /* Specific height for mobile */
    }
}

.service-detail-content h2 {
    margin-bottom: 1.5rem;
}

.service-detail-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Benefit Lists Styling */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #ffffff;
    /* Unified white background like screenshot */
    padding: 1.25rem;
    border-radius: 12px;
    /* Rounded corners */
    box-shadow: none;
    transition: all var(--transition-fast);
    border: 1px solid #e5e7eb;
    /* Light gray border */
}

.benefits-list li span {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.4;
    /* Tighter overall line height */
}

.benefits-list li strong {
    display: block;
    margin-bottom: 0;
    /* Remove margin for tighter spacing */
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.2;
    /* Tighter title line height */
}

/* Sections with gray background need white cards for contrast */
.section[style*="background: var(--bg-light)"] .benefits-list li {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Keep distinct shadow for contrast on gray bg */
}

.benefits-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    border-color: var(--accent);
}

.benefits-list li::before {
    content: '✓';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    /* Added for centering */
    align-items: center;
    /* Vertically center */
    justify-content: center;
    /* Horizontally center */
    font-size: 14px;
    /* Ensure icon fits well */
}

.carousel-container {
    overflow: hidden;
    padding: 1rem 0;
    display: inline-block;
    max-width: 1000px;
    margin: 0 22px;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    /* Inherits .service-card styles */
}

.zona {
    position: absolute;
    bottom: 34px;
    color: var(--accent);
    font-weight: 600;
}

@media (min-width: 768px) {
    .carousel-card {
        flex: 0 0 calc(50% - 1rem);
        /* Tablet: 2 per view */
    }
}

@media (min-width: 1024px) {
    .carousel-card {
        flex: 0 0 calc(33.333% - 1.33rem);
        /* Desktop: 3 per view */
    }
}

.carousel-btn {
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin-top: 300px;
    /* Raised 80px from 1050px */
    transform: translateY(-50%);
    background: #ffffff;
    color: var(--primary);
    border: 2px solid var(--border);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}



/* Carousel navigation button markers (placeholder comments) */
.carousel-btn.prev {
    /* 200px inward margin marker */
    visibility: visible;
}

.carousel-btn.next {
    /* 200px inward margin marker */
    visibility: visible;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }

    .carousel-wrapper {
        padding: 0;
    }

    .carousel-container {
        margin: 0 1rem !important;
        display: block !important;
    }

    .carousel-track {
        gap: 1rem !important;
        padding-left: 0.5rem;
        /* Allow first card to have some breathing room from left */
    }

    .carousel-card {
        flex: 0 0 85% !important;
        scroll-snap-align: start !important;
    }

    /* Restore uniform image heights for carousel thumbnails */
    .carousel-card img {
        height: 200px !important;
        object-fit: cover !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    .carousel-card h3 {
        margin-bottom: 0.5rem;
        font-size: 1.25rem;
    }

    .carousel-card p {
        font-size: 0.95rem;
    }
}