/* Estilos generales */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores principal */
    --primary-red-dark: #9A1815;  /* Rojo oscuro */
    --primary-red: #7D0809;       /* Rojo principal */
    --secondary-beige: #BBA38E;   /* Beige oscuro */
    --secondary-cream: #E6D7BE;   /* Crema claro */
    --dark: #070705;              /* Negro */
    --accent-blue: #457B9D;       /* Azul acento */
    
    /* Colores adicionales para la interfaz */
    --text-color: #333333;
    --light-text: #ffffff;
    --light-bg: #f9f7f4;
    --border-color: #e5e0d8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --overlay: rgba(7, 7, 5, 0.7);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    font-size: 1.6rem;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 10rem 0;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    transition: var(--transition);
}

h1 {
    font-size: 4.8rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 3.6rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.6rem;
    font-size: 1.6rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 1.6rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-red-dark);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--light-text);
    border: 2px solid var(--primary-red);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(125, 8, 9, 0.3);
    border-color: var(--primary-red-dark);
}

/* Secciones del Header */
.section-header {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
}

.section-header h2 {
    color: var(--primary-red);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 3px;
    background-color: var(--secondary-beige);
    transition: var(--transition);
}

.section-header:hover h2::after {
    width: 10rem;
}

.section-header p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin: 0 auto;
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.section-header:hover p {
    opacity: 1;
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(7, 7, 5, 0.9);
    transition: var(--transition);
    padding: 0.5rem 4rem; /* Valor positivo y razonable */
    height: 10rem;
}

header.scrolled {
    padding: 1.5rem 4rem;
    background-color: rgba(7, 7, 5, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    transition: var(--transition);
    top: -8rem;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo-container a img {
    height: 10rem;
    width: auto;
    margin-right: 1rem;
    transition: var(--transition);
}

.logo-container:hover img {
    transform: rotate(5deg);
}

.logo-container h1 {
    color: var(--light-text);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.main-menu {
    display: flex;
    align-items: center;
     margin-top: 0.5rem;
}

.main-menu li {
    margin-left: 3rem;
    position: relative;
}

.main-menu a {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    transition: var(--transition);
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-beige);
    transition: var(--transition);
}

.main-menu a:hover::after,
.main-menu a.active::after {
    width: 100%;
}

.main-menu a:hover {
    color: var(--secondary-beige);
    transform: translateY(-2px);
}

.main-menu a.active {
    color: var(--secondary-beige);
}

.lang-switch {
    border: 1px solid var(--secondary-beige);
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    transition: var(--transition);
}

.lang-switch:hover {
    background-color: var(--secondary-beige);
    color: var(--dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 2.4rem;
    cursor: pointer;
    transition: var(--transition);
}
.mobile-toggle:hover {
    transform: rotate(90deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
    transition: var(--transition);
}

.hero:hover::before {
    background-color: rgba(7, 7, 5, 0.6);
}

.hero-content {
    position: relative;
    color: var(--light-text);
    z-index: 1;
    max-width: 70rem;
    margin-left: 10rem;
}

.hero-content h2 {
    font-size: 5.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: var(--light-text);
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease forwards;
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    max-width: 50rem;
    line-height: 1.6;
    color: var(--light-text);
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease 0.3s forwards;
}

.hero-content .btn {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease 0.6s forwards;
}

/* Clientes Section */
.clientes-section {
    padding: 8rem 0;
    background-color: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.clients-slider {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.clients-track {
    display: flex;
    animation: scroll 30s linear infinite;
}

.clients-track:hover {
    animation-play-state: paused;
}

.client-slide {
    flex: 0 0 auto;
    width: 200px;
    margin: 0 2rem;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 1rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.client-logo::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: 0.5s;
}

.client-logo:hover::before {
    left: 100%;
}

.client-logo:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.client-logo:hover img {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Gallery Section */
.gallery-section {
    padding: 10rem 0;
    background-color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    height: 300px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(125, 8, 9, 0.7) 100%
    );
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1) rotate(0.5deg);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.line-tag {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background-color: var(--primary-red);
    color: var(--light-text);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    z-index: 2;
    transition: var(--transition);
}

.gallery-item:hover .line-tag {
    background-color: var(--primary-red-dark);
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light-text);
    padding: 8rem 5rem 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 5rem;
    margin-bottom: 5rem;
}

.footer-logo h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
    transition: var(--transition);
}

.footer-logo:hover h2 {
    color: var(--secondary-beige);
}

.footer-logo p {
    font-size: 1.5rem;
    color: #aaa;
    max-width: 30rem;
    transition: var(--transition);
}

.footer-logo:hover p {
    color: #ddd;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: var(--light-text);
    position: relative;
    padding-bottom: 1rem;
}

.footer-links h3::after,
.footer-social h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 5rem;
    height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.footer-links h3:hover::after,
.footer-social h3:hover::after,
.footer-contact h3:hover::after {
    width: 8rem;
}

.footer-links ul li {
    margin-bottom: 1.2rem;
}

.footer-links ul li a {
    color: #aaa;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.footer-links ul li a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-beige);
    padding-left: 2rem;
}

.footer-links ul li a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-social p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-red);
    transform: scale(0);
    transition: var(--transition);
    border-radius: 50%;
}

.social-icons a:hover::before {
    transform: scale(1);
}

.social-icons a i {
    font-size: 1.8rem;
    color: var(--light-text);
    transition: var(--transition);
    z-index: 1;
}

.social-icons a:hover i {
    transform: scale(1.2);
}

.footer-contact p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.footer-contact p:hover {
    color: #ddd;
    transform: translateX(5px);
}

.footer-contact p i {
    margin-right: 1rem;
    color: var(--primary-red);
    transition: var(--transition);
}

.footer-contact p:hover i {
    transform: rotate(15deg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #777;
    font-size: 1.4rem;
    transition: var(--transition);
}

.footer-bottom p:hover {
    color: #aaa;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 6rem;
    height: 6rem;
    background-color: #25D366;
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
}

/* Botón Volver Arriba */
.scroll-top-btn {
    position: fixed;
    bottom: 3rem;
    right: 10rem;
    width: 5rem;
    height: 5rem;
    background-color: var(--primary-red);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(125, 8, 9, 0.4);
}

.scroll-top-btn i {
    animation: bounce 2s infinite;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(3rem);
    transition: all 0.6s ease;
}

.animate-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos de parallax */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-beige);
    border-top: 5px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sistema de notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #2ecc71;
}

.notification.error {
    background-color: #e74c3c;
}

.notification.info {
    background-color: #3498db;
}

.notification i {
    font-size: 1.8rem;
}

/* Media queries para notificaciones */
@media (max-width: 768px) {
    .notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        transform: translateY(120%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Media queries para responsividad */
@media (max-width: 1200px) {
    html {
        font-size: 56.25%; /* 1rem = 9px */
    }

    .hero-content {
        margin-left: 5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 50%; /* 1rem = 8px */
    }

    header {
        padding: 2rem;
    }

    header.scrolled {
        padding: 1.5rem 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .gallery-item {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    /* Seleccionamos tanto nav como main-nav para mantener compatibilidad */
    nav, .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--dark);
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 10rem 2rem;
    }
    
    nav.active, .main-nav.active {
        right: 0;
    }
    
    .main-menu {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-menu li {
        margin: 1rem 0;
        width: 100%;
    }

    .whatsapp-btn {
        bottom: 2rem;
        right: 2rem;
        width: 5rem;
        height: 5rem;
        font-size: 2.4rem;
    }

    .scroll-top-btn {
        bottom: 2rem;
        right: 8rem;
        width: 4.5rem;
        height: 4.5rem;
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 3rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links h3::after,
    .footer-social h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social .social-icons {
        justify-content: center;
    }
    .footer-logo p {
        text-align: center;
        max-width: 50rem;
    }

    .footer-logo {
        text-align: center;
        width: 100%;
    }

    .footer-contact p {
        justify-content: center;
    }

    .gallery-item {
        height: 200px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
}