:root {
    --primary-blue: #0052cc;
    --dark-color: #282c34; /* Gris oscuro en lugar de negro */
    --light-color: #ffffff;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --light-gray-bg: #f9f9f9;
    --border-color: #eaeaea;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header y Navegación */
.main-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--primary-blue);
}

/* Hero Section */
#hero {
    position: relative;
    padding: 8rem 0;
    text-align: center;
    color: var(--light-color);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1531297484001-80022131f5a1?q=80&w=2020&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    z-index: -1;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    background-color: var(--primary-blue);
    color: var(--light-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #003d99;
}

/* Servicios Section */
#servicios {
    padding: 5rem 0;
    background-color: var(--light-gray-bg);
    text-align: center;
}

#servicios h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
    color: #555;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

.card {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Para contener la imagen */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.card-link {
    text-decoration: none;
    color: inherit;
}

/* Nosotros Section */
#nosotros {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center;
}

#nosotros .container {
    max-width: 800px;
}

#nosotros h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#nosotros ul {
    list-style-type: none;
    padding-left: 0;
}

#nosotros ul li {
    padding-left: 0;
}

/* Contacto Section */
#contacto {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--light-color);
}

#contacto h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#contacto p {
    margin-bottom: 2rem;
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
}

.footer-logo img {
    height: 35px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* Servicios Detail Page */
.service-detail {
    padding: 4rem 0;
}

.service-detail:nth-child(even) {
    background-color: var(--light-gray-bg);
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.service-image img {
    width: 100%;
    border-radius: 8px;
}

.service-description h2 {
    font-size: 2.8rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.service-description h3 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-sub-sections ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

.sub-service-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 2rem;
}

.sub-service-grid.reverse {
    grid-template-columns: 1fr 100px;
}

.sub-service-icon {
    text-align: center;
}

.sub-service-icon img {
    width: 80px;
    height: 80px;
}

.sub-service-description h3 {
    font-size: 1.5rem;
    margin-top: 0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }

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

    .sub-service-grid,
    .sub-service-grid.reverse {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sub-service-icon {
        margin-bottom: 1rem;
    }
}