
:root {
    --primary-gradient: linear-gradient(135deg, #bbdefb, #1e88e5);
    --text-color: #333;
    --bg-color: #fff;
    --section-bg: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --nav-bg: linear-gradient(45deg, #1a237e, #0d47a1, #01579b);
    --hero-gradient: linear-gradient(90deg, #FF8C00, #FFA500, #FF4500);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-bg: rgba(255, 255, 255, 0.9);
}

.dark-mode-toggle {
    --toggle-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease;
    width: var(--toggle-size);
    height: var(--toggle-size);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

.dark-mode-toggle .icon {
    display: none;
    width: 100%;
    height: 100%;
}

.dark-mode-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: block;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--primary-gradient); 
    color: var(--text-color); 
    overflow-x: hidden; /* Hide horizontal scroll */
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(70, 70, 70, 0.03), rgba(100, 100, 100, 0.03) 50px);
    pointer-events: none;
    z-index: -1;
}

/* Header & Navigation */
.header {
    background: var(--nav-bg);
    position: relative;
    width: 100%;
    z-index: 100;
    padding: 0;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.nav {
    background: transparent;
    padding: 15px 30px;
    max-width: 1200px;
    margin: 0 auto;
    transform: translateZ(0); /* Hardware acceleration */
    will-change: transform; /* Optimize animations */
    backface-visibility: hidden; /* Reduce visual artifacts */
}

.nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav ul li {
    margin: 0;
}

.nav a {
    color: white;
    font-size: 1.1em;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transform: translateZ(0); /* Hardware acceleration */
    will-change: transform; /* Optimize animations */
    backface-visibility: hidden; /* Reduce visual artifacts */
}

.nav a:hover {
    background-color: rgba(0, 0, 0, 0.2); /* Darker background on hover */
    color: white;
    transform: translateY(-2px);
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav a:hover::before {
    left: 100%;
}

.nav ul li.logo a {
    font-size: 1.8em;
    font-weight: 700;
    padding: 0 30px 0 0;
    background: var(--hero-gradient); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    margin-right: 20px;
}

.nav ul li.logo a:hover {
    background-position: 100% 0;
    transform: scale(1.05);
    background: var(--hero-gradient); 
    -webkit-background-clip: text;
}

/* Sections */
.section {
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 20px;
    transform: translateZ(0); /* Hardware acceleration */
    will-change: transform, opacity; /* Optimize animations */
    backface-visibility: hidden; /* Reduce visual artifacts */
    box-shadow: 0 2px 5px var(--shadow-color); /* subtle black shadow */
    position: relative;
    border-left: 3px solid var(--border-color);
    border-right: 3px solid var(--border-color);
    background: var(--section-bg);
    backdrop-filter: blur(5px);
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, rgba(70, 70, 70, 0.1), rgba(100, 100, 100, 0.2), rgba(70, 70, 70, 0.1));
    border-radius: 3px 3px 0 0;
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, rgba(70, 70, 70, 0.1), rgba(100, 100, 100, 0.2), rgba(70, 70, 70, 0.1));
    border-radius: 0 0 3px 3px;
}

.section h1, .section h2 {
    font-size: 4.5em;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #1a237e, #0d47a1, #01579b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    letter-spacing: 3px;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 25px;
    text-shadow: none;
}

.section h1::after, .section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section h1:hover::after, .section h2:hover::after {
    width: 180px;
}

.section h1::before, .section h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-50%, 0) scale(1.5);
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 0.1;
    }
}

.section h1:hover, .section h2:hover {
    transform: translateY(-3px); /* Slight lift on hover */
    color: #0d47a1; /* Change color on hover */
}

.section h1::after, .section h2::after {
    content: '';
    position: absolute;
    left: 50%; /* Center the glow */
    bottom: -10px; /* Position below the text */
    transform: translateX(-50%); /* Ensure perfect centering */
    width: 50%; /* Adjust the width as needed */
    height: 5px; /* Adjust the height as needed */
    background: linear-gradient(to right, rgba(0, 123, 255, 0.3), rgba(30, 144, 255, 0.3)); /* Gradient for the glow */
    border-radius: 5px;
    filter: blur(3px); /* Add a blur effect for a glow */
    opacity: 0.7; /* Adjust opacity as needed */
    pointer-events: none; /* Prevent interference with mouse interactions */
    transition: width 0.3s ease; /* Smooth transition for the width */
}

.section h1:hover::after, .section h2:hover::after {
    width: 70%; /* Wider glow on hover */
}

/* Hero Section */
.hero {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 150px 20px 100px;
    margin-top: 0;
    text-align: center;
    position: relative;
    overflow: hidden; 
    box-shadow: 0 2px 5px var(--shadow-color); /* subtle black shadow */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(70, 70, 70, 0.05) 25%, transparent 25%, 
                transparent 50%, rgba(70, 70, 70, 0.05) 50%, 
                rgba(70, 70, 70, 0.05) 75%, transparent 75%);
    background-size: 30px 30px;
    pointer-events: none;
}

.hero h1 {
    font-size: 5.5em;
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.hero h1:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-size: 1.8em;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.hero-subtitle:hover {
    transform: scale(1.02);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.hero-image {
    max-width: 80%;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.hero-button {
    background: var(--nav-bg);
    color: #fff;
    padding: 18px 40px;
    font-size: 1.3em;
    border: none;
    border-radius: 35px;
    box-shadow: 0 6px 12px var(--shadow-color);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin-top: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px var(--shadow-color);
    background: linear-gradient(45deg, #01579b, #0d47a1, #1a237e);
}

.hero-button:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.hero-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.7s ease;
}

.hero-button:hover:before {
    left: 100%;
}

.hero-button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.hero-button:focus:not(:active):after {
    animation: ripple 1s ease-out;
}

/* About Us Section Styles */
#sobre-nosotros {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 80px 100px;
    text-align: left;
    position: relative;
    background: var(--section-bg);
    backdrop-filter: blur(5px);
}

#sobre-nosotros h2 {
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

.about-content {
    padding-right: 30px;
}

.about-content h2 {
    font-size: 4.5em;
    margin-bottom: 30px;
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
    display: inline-block;
    letter-spacing: 3px;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 25px;
    text-shadow: none;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.about-content h2:hover::after {
    width: 180px;
}

.about-content h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

.about-content p {
    font-size: 1.3em;
    line-height: 1.9;
    color: #333;
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    font-family: 'Blauer Nue', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.about-content p .char {
    display: inline-block;
    transform-origin: 50% 50%;
    transition: color 0.3s ease;
}

.about-content p .char:hover {
    color: #0d47a1;
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

.about-image-container {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 10px 30px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f3f3f3, #e6e6e6);
    font-family: 'Arial', sans-serif;
    color: #999;
    font-size: 1.2em;
}

/* Services Section Styles */
#servicios {
    text-align: center;
    background: var(--section-bg);
    backdrop-filter: blur(5px);
}

#servicios h2 {
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

#servicios h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

#servicios h2:hover::after {
    width: 180px;
}

#servicios h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

#servicios > p {
  font-size: 1.8em;
    color: #FFFFFF;
    max-width: 800px;
    margin: 20px auto 50px;
    line-height: 1.6;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color
: #FFFFFF;
    opacity: 1;
    transform: translateY(0);
    font-family: 'Blauer Nue', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.service-box {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), 
                box-shadow 0.4s ease;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
}

.service-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, rgba(70, 70, 70, 0.1), rgba(100, 100, 100, 0.2), rgba(70, 70, 70, 0.1));
    border-radius: 5px 5px 0 0;
}

.service-box:hover {
    transform: translateY(-15px) rotate(2deg);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.service-box h3 {
    font-size: 2em;
    margin: 20px 0;
    position: relative;
    padding-bottom: 15px;
    color: #FFFFFF;
}

.service-box h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    transition: width 0.3s ease;
}

.service-box:hover h3::after {
    width: 100%;
}

.service-box p {
    font-size: 1.2em;
    line-height: 1.7;
    transition: color 0.3s ease;
}

.service-box:hover p {
    color: #1a237e;
}

.service-image-container {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.1), rgba(13, 71, 161, 0.1)) !important;
    border: none;
    transition: transform 0.3s ease;
    display: grid;
    place-items: center;
    padding: 0;
    height: 150px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-box:hover .service-image {
    transform: scale(1.1);
}

.service-image-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 80%);
    animation: shine 4s infinite;
}

.service-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 1.2em;
}

/* Contact Section Styles */
#contacto {
    padding: 100px 80px;
    text-align: center;
    background: var(--section-bg);
    backdrop-filter: blur(5px);
}

#contacto h2 {
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

#contacto h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

#contacto h2:hover::after {
    width: 180px;
}

#contacto h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

#contacto > p {
    font-size: 1.8em;
    color: #FFFFFF;
    max-width: 800px;
    margin: 20px auto 50px;
    line-height: 1.6;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
    opacity: 1;
    transform: translateY(0);
    font-family: 'Blauer Nue', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

[data-theme="dark"] #contacto > p {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] #contacto > p:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 30px;
}

.map-container {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(70, 70, 70, 0.03), rgba(100, 100, 100, 0.05));
    border-radius: 15px;
    pointer-events: none;
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-top: 0;
    transition: box-shadow 0.5s ease, transform 0.5s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(70, 70, 70, 0.03), rgba(100, 100, 100, 0.05));
    border-radius: 20px;
    pointer-events: none;
}

.contact-form-container:hover {
    background: var(--card-bg);
    box-shadow: 0 15px 40px var(--shadow-color);
    transform: scale(1.02);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #FFFFFF;
    text-align: left;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    color: #444;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Portfolio Section Styles */
#portafolio {
    padding: 80px 20px;
    text-align: center;
    background: var(--section-bg);
    backdrop-filter: blur(5px);
    color: #333;
    position: relative;
    overflow: hidden;
}

#portafolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(70, 70, 70, 0.05), rgba(100, 100, 100, 0.05));
    pointer-events: none;
}

#portafolio h2 {
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

#portafolio h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

#portafolio h2:hover::after {
    width: 180px;
}

#portafolio h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

#portafolio > p {
    font-size: 1.8em;
    color: #FFFFFF;
    max-width: 800px;
    margin: 20px auto 50px;
    line-height: 1.6;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
    opacity: 1;
    transform: translateY(0);
    font-family: 'Blauer Nue', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

.year-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.year-button {
    padding: 12px 25px;
    border: none;
    background: linear-gradient(45deg, #1a237e, #0d47a1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

.year-button:hover {
    background: linear-gradient(45deg, #0d47a1, #1a237e);
}

.year-button.active {
    background: white;
    color: #0d47a1;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.collage-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 200px);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: #6BA6CD;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.collage-item {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
    cursor: pointer;
}

.collage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.collage-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.collage-item.medium {
    grid-column: span 1;
    grid-row: span 2;
}

.collage-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.collage-placeholder svg {
    width: 40px;
    height: 40px;
    color: #6c757d;
}

.collage-placeholder p {
    color: #495057;
    font-size: 0.9em;
    text-align: center;
    margin: 0;
}

.collage-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: var(--overlay-bg);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.collage-item:hover .collage-text {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .collage-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .collage-item.large,
    .collage-item.medium {
        grid-column: span 1;
        grid-row: span 1;
        height: 200px;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #222; 
    color: white;
    box-shadow: 0 -2px 5px var(--shadow-color); /* subtle black shadow */
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(70, 70, 70, 0.3), rgba(100, 100, 100, 0.4));
    opacity: 0.3;
    pointer-events: none;
}

/* Client Section Header Styles */
#clientes {
    background: var(--section-bg);
    backdrop-filter: blur(5px);
}

#clientes h2 {
    color: #FFFFFF;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

#clientes h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #1a237e, #0d47a1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

#clientes h2:hover::after {
    width: 180px;
}

#clientes h2::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

/* Add helper class to hide elements */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-expanded-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        width: 100%;
        position: relative;
        top: 0;
    }

    .nav {
        padding: 8px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 4px 15px var(--shadow-color);
        z-index: 200;
        width: 100%;
    }
    
    .nav ul.show {
        display: flex;
    }
    
    .nav a {
        font-size: 0.95em;
        padding: 10px;
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav ul li {
        display: block;
        margin: 5px 0;
        width: 100%;
    }

    .nav ul li.logo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .nav ul li.logo a {
        font-size: 1.2em;
        padding: 0;
        margin: 0;
        border-right: none;
    }
    
    .section {
        padding: 60px 15px;
    }

    .hero {
        padding: 80px 15px 60px;
    }
    
    .hero h1 {
        font-size: 2.8em;
    }
    
    .section h1, .section h2 {
        font-size: 2.2em;
    }
    
    .section > p,
    .section-subtitle,
    .hero-subtitle {
        font-size: 1.4em;
        padding: 0 15px;
        margin: 15px auto 30px;
    }
    
    #sobre-nosotros {
        grid-template-columns: 1fr;
        padding: 60px 20px;
        gap: 30px;
    }

    .about-content {
        padding-right: 0;
    }

    .about-image-container {
        height: 250px;
    }

    .about-content h2 {
        font-size: 2.5em;
    }

    .about-content p {
        font-size: 1.1em;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .collage-container {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .collage-item.large,
    .collage-item.medium {
        grid-column: span 1;
        grid-row: span 1;
        height: 200px;
    }
    
    .year-filters {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .year-button {
        padding: 10px 15px;
        font-size: 0.9em;
        min-width: 80px;
    }
    
    .mapa-container {
        flex-direction: column;
    }
    
    #mapa-mexico {
        height: 300px;
    }
    
    .contact-container {
        flex-direction: left;
    }
    
    .map-container,
    .contact-form-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero-subtitle {
        font-size: 1.1em;
    }
    
    .hero-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .section h1, .section h2 {
        font-size: 2.2em;
    }
    
    .about-content p {
        font-size: 1em;
        line-height: 1.6;
    }
    
    .service-box h3 {
        font-size: 1.3em;
    }
    
    .cliente-logo {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .cliente-logo p {
        font-size: 0.8em;
    }
    
    .form-group label {
        font-size: 1em;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    margin: 15px;
    z-index: 300;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
    top: 0px;
}

.hamburger-menu span:nth-child(2) {
    top: 8px;
}

.hamburger-menu span:nth-child(3) {
    top: 16px;
}

.hamburger-menu.open span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-menu.open span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

@media (max-width: 480px) {
    .hamburger-menu {
        width: 24px;
        height: 18px;
        margin: 12px;
    }
    
    .hamburger-menu span {
        height: 2px;
    }
    
    .hamburger-menu span:nth-child(2) {
        top: 7px;
    }
    
    .hamburger-menu span:nth-child(3) {
        top: 14px;
    }
    
    .hamburger-menu.open span:nth-child(1) {
        top: 7px;
    }
    
    .hamburger-menu.open span:nth-child(3) {
        top: 7px;
    }
}

/* Ensure touch interactions */
@media (hover: none) {
    .nav a:hover::before,
    .service-box:hover,
    .collage-item:hover,
    .social-link:hover,
    .cliente-logo:hover {
        /* Override hover states with tap states */
        transform: none;
    }
    
    .nav a:active,
    .service-box:active,
    .collage-item:active,
    .social-link:active,
    .cliente-logo:active {
        transform: scale(0.98);
    }
}

/* Image optimization for better mobile performance */
.service-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
}

/* Updated Section Subtitles */
.section > p,
.section-subtitle,
.hero-subtitle {
    font-size: 2em; 
    color: #FFFFFF;
    max-width: 800px;
    margin: 20px auto 50px;
    line-height: 1.8; 
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
    opacity: 1;
    transform: translateY(0);
    font-family: 'Blauer Nue', sans-serif;
    font-weight: 500;
    letter-spacing: 1px; 
    padding: 0 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.3); 
}

/* Dark mode subtitle styles update */
[data-theme="dark"] .text-subtitle {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .section > p:hover,
[data-theme="dark"] .section-subtitle:hover,
[data-theme="dark"] .hero-subtitle:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.info-clientes-overlay h3 {
    color: #4FC3F7;
}

.form-group label {
    color:#0b0101;
}

.footer-col h3 {
    color: #FFFFFF;
}

h2, h3, h4, h5, h6,
.hero-subtitle,
.section-subtitle,
#contacto > p {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background: none !important;
    background-clip: unset !important;
}

.mapa-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#mapa-mexico {
    flex: 1;
    min-width: 300px;
    height: 500px;
}

.info-clientes-overlay {
    flex: 1;
    min-width: 300px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px var(--shadow-color);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.info-clientes-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(70, 70, 70, 0.03), rgba(100, 100, 100, 0.05));
    border-radius: 15px;
    pointer-events: none;
}

.info-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 123, 255, 0.3);
}

.info-header h3 {
    color: #FFFFFF;
    font-size: 1.8em;
    margin: 0;
}

.clientes-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.cliente-logo {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    transition: transform 0.3s ease;
}

.cliente-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.cliente-logo img {
    max-width: 100%;
    max-height: 70px;
    margin-bottom: 10px;
}

.cliente-logo p {
    margin: 0;
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Estilos para los estados del mapa */
.estado {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: 1;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.estado:hover {
    fill: #1a237e;
}

.estado-con-clientes {
    fill: #b0c4de;
}

.estado-con-clientes:hover {
    fill: #0d47a1;
}

@media (max-width: 768px) {
    .mapa-container {
        flex-direction: column;
    }
    
    #mapa-mexico {
        height: 350px;
    }
    
    .cliente-logo {
        width: 90px;
        height: 90px;
    }
}

.whatsapp-button {
    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: 100;
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-button:hover {
    transform: scale(1.1);
}

.whatsapp-button img {
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .whatsapp-button {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-button img {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
    }

    .whatsapp-button img {
        width: 30px;
        height: 30px;
    }
}

/* Footer Social Media and Contact Section */
.footer-expanded {
    padding: 60px 20px;
    background: var(--nav-bg);
    color: white;
    position: relative;
}

.footer-expanded::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(70, 70, 70, 0.1), rgba(100, 100, 100, 0.15));
    pointer-events: none;
}

.footer-expanded-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    padding: 20px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #FFFFFF;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
    border-radius: 1.5px;
}

.footer-col p {
    margin-bottom: 15px;
    font-size: 1.1em;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-5px);
    background: white;
    color: #0d47a1;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.contact-info-item svg {
    flex-shrink: 0;
}

.quick-links {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 10px;
}

.quick-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.quick-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: white;
    transition: width 0.3s ease;
}

.quick-links a:hover {
    color: #90caf9;
}

.quick-links a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .footer-expanded {
        padding: 40px 15px;
    }
    
    .footer-expanded-content {
        grid-template-columns: 1fr;
    }
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.5));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 123, 255, 0.7));
        transform: scale(1.05);
    }
    100% {
        filter: drop-shadow(0 0 15px rgba(0, 198, 255, 0.6));
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

@keyframes shine {
    0% { 
        transform: rotate(45deg) translateX(-150%); 
    }
    100% { 
        transform: rotate(45deg) translateX(150%); 
    }
}
.hamburger {
    display: none; /* No se muestra por defecto */
    flex-direction: column; /* Disposición vertical de los elementos */
    justify-content: space-between; /* Espacio uniforme entre elementos */
    width: 25px; /* Ancho del botón */
    height: 20px; /* Alto del botón */
    background:#000080; /* Fondo transparente para el botón */
    border: none; /* Sin bordes */
    cursor: pointer; /* Cursor tipo puntero al pasar sobre él */
    z-index: 1001; /* Capa superior para asegurar visibilidad */
    padding: 5px; /* Espaciado interno para mejor tacto */
}

/* Estilo de las líneas/barras del menú hamburguesa */
.hamburger span {
    height: 3px; /* Altura de cada barra */
    width: 100%; /* Ancho completo del contenedor */
    background:#000000; /* Color gris oscuro de las barras */
    border-radius: 5px; /* Bordes redondeados */
    transition: 0.3s ease; /* Transición suave para animaciones */
}

/* Transformación cuando el menú está activo (forma de X) */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Mueve y rota la primera barra */
}
.hamburger.active span:nth-child(2) {
    opacity: 0; /* Hace invisible la barra del medio */
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Mueve y rota la tercera barra */
}

/* Estilos responsivos para pantallas pequeñas (≤768px) */
@media (max-width: 768px) {
    /* Estilo del menú de navegación en móviles - ahora con fondo gris */
    .nav ul {
        position: absolute; /* Posicionamiento absoluto */
        top: 70px; /* Distancia desde la parte superior */
        right: 0; /* Alineado a la derecha */
        background: #1591EA; /* Fondo gris claro (#f5f5f5) */
        flex-direction: column; /* Disposición vertical */
        width: 200px; /* Ancho del menú */
        padding: 20px; /* Espaciado interno */
        display: none; /* Oculto por defecto */
        box-shadow: 0 0 10px rgba(0,0,0,0.1); /* Sombra sutil */
        z-index: 1000; /* Capa inferior al botón hamburguesa */
        border-radius: 0 0 0 10px; /* Bordes redondeados en esquina inferior izquierda */
    }

    /* Clase para mostrar el menú cuando está activo */
    .nav ul.active {
        display: flex; /* Muestra el menú en disposición flex */
    }

    /* Estilo de los items del menú para mejor contraste con fondo gris */
    .nav ul li a {
        color: #FFFFFF; /* Color de texto más oscuro */
        padding: 10px 0; /* Mayor espaciado vertical */
        border-bottom: 1px solid #e0e0e0; /* Separador sutil entre items */
    }

    /* Muestra el botón hamburguesa en móviles */
    .hamburger {
        display: flex;
    }
}

       { color: #333333 !important; /* Texto oscuro sobre fondo blanco */
        font-weight: 600 !important; /* Mayor peso para mejor legibilidad */
    }
/* ===== PORTAFOLIO COLLAGE - AGREGAR AL FINAL ===== */

.year-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.year-button {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.year-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.year-button:hover::before {
    left: 100%;
}

.year-button:hover,
.year-button.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.collage-container {
    display: none;
    margin-top: 30px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.collage-container.show {
    display: block;
    opacity: 1;
}

.year-title {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.collage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.collage-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.collage-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collage-item:hover img {
    transform: scale(1.1);
}

.collage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.collage-item:hover .collage-overlay {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .year-filters {
        gap: 10px;
    }
    
    .year-button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .collage-grid {
        gap: 10px;
    }
    
    .year-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .year-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .collage-grid {
        gap: 8px;
    }
}
