/* ==========================================
   DRCERRAMAMIENTOS - ESTILOS PRINCIPALES
   ========================================== */

/* Variables CSS */
:root {
    /* Colores */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #ecf0f1;
    --bg-dark: #34495e;
    --white: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    
    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    
    /* Fonts */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 3rem;
}

/* ==========================================
   RESET Y BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ==========================================
   LOADING SCREEN
   ========================================== */

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--bg-light);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#loading-text {
    margin-top: 20px;
    font-size: var(--font-size-lg);
    color: var(--text-light);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo-text span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.cta-button {
    padding: 0.65rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--secondary-color);
}

.cta-button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cta-button::after {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 3px;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 152, 219, 0.7));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: var(--font-size-xl);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--font-size-lg);
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--secondary-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   SECCIONES GENERALES
   ========================================== */

section {
    padding: var(--spacing-xl) 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* ==========================================
   GRID DE PRODUCTOS/SERVICIOS
   ========================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: var(--font-size-sm);
}

.product-link {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-link:hover {
    gap: 1rem;
}

/* ==========================================
   CARACTERÍSTICAS / VENTAJAS
   ========================================== */

.features-section {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ==========================================
   GALERÍA
   ========================================== */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--bg-light);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h3 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.gallery-info p {
    color: rgba(255,255,255,0.8);
    font-size: var(--font-size-sm);
}

/* ==========================================
   CARRUSEL DE PRODUCTOS
   ========================================== */

.product-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--bg-dark);
}

.carousel-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* Ratio 3:2 */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-arrow:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.carousel-arrow.prev {
    left: 1rem;
}

.carousel-arrow.next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   FORMULARIO
   ========================================== */

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--bg-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.radio-option {
    padding: 1rem;
    border: 2px solid var(--bg-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    border-color: var(--secondary-color);
}

.radio-option input[type="radio"] {
    margin-right: 0.5rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   FOOTER CORREGIDO
   ========================================== */

footer {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-lg) 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Columnas específicas */
    gap: 2.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
    display: block;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: var(--secondary-color);
    padding-left: 8px;
    transform: translateX(3px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
    margin: 0;
    padding: 0;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.1);
    padding: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* RESPONSIVE FOOTER */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr; /* 2 columnas en tablets */
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr; /* 1 columna en móviles */
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section {
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-section:last-child {
        border-bottom: none;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section a:hover {
        padding-left: 0;
        transform: none;
    }
}
/* ==========================================
   WHATSAPP FLOTANTE
   ========================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    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: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }