/* Variables & Theme Settings - Light Mode */
:root {
    /* Colors */
    --bg-dark: #ffffff;      /* Main background */
    --bg-darker: #f0f4f8;    /* Secondary background */
    --bg-card: #ffffff;      /* Card background */
    --primary: #004b87;      /* Superconexiones Blue */
    --primary-hover: #003666;
    --secondary: #0099cc;    /* Accent Blue */
    --accent: #00b4d8;
    
    /* Text */
    --text-main: #1e293b;    /* Dark text for readability */
    --text-muted: #64748b;   /* Muted text */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-text: linear-gradient(to right, var(--primary), var(--secondary));
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.08);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Spacing & Sizes */
    --section-pad: 5rem 0;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    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: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

.highlight {
    color: var(--primary);
}

.highlight-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 75, 135, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0, 75, 135, 0.3);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: rgba(0, 75, 135, 0.05);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: #ffffff; /* Always solid or blur in light mode for readability */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

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

.logo-img {
    height: 85px;
    width: auto;
    transition: var(--transition);
}

.header.scrolled .logo-img {
    height: 50px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-main);
}

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

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

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

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('hero-bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 160px; /* offset header */
}

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

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 2rem;
    color: var(--primary);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Nosotros Stats */
.nosotros {
    background-color: var(--bg-darker);
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 75, 135, 0.08);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-number {
    display: inline-block;
    font-size: 3.5rem;
    margin-bottom: 0;
    color: var(--primary);
}

.stat-plus {
    font-size: 3rem;
    color: var(--secondary);
    font-weight: 800;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Productos */
.productos {
    background: var(--bg-dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 75, 135, 0.08);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 75, 135, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Contacto */
.contacto {
    background-color: var(--bg-darker);
    position: relative;
}

.contacto::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(0, 75, 135, 0.05), transparent 50%);
    pointer-events: none;
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contacto-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.icon-box {
    background: rgba(0, 75, 135, 0.1);
    color: var(--primary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.contact-details p {
    color: var(--text-muted);
}

.contact-details a {
    color: var(--text-muted);
}

.contact-details a:hover {
    color: var(--primary);
}

.contacto-form-container {
    padding: 2.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.contacto-form-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-main);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 75, 135, 0.1);
    background: #ffffff;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: white;
    padding-top: 4rem;
}

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

.footer-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1); /* makes the logo white */
}

.footer-brand p {
    color: rgba(255,255,255,0.8);
    margin: 1rem 0 1.5rem;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* Top Bar */
.top-bar {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    transition: var(--transition);
}

.header.scrolled .top-bar {
    display: none;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-item i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Icon Box Cards (Productos) */
.icon-boxes-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.icon-box-card {
    background: transparent;
    border: none;
    text-align: center;
    padding: 2rem 1rem;
    transition: var(--transition);
}

.icon-box-card:hover {
    transform: translateY(-5px);
}

.icon-img-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.icon-box-info h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 800;
}

.icon-box-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

/* Responsive */
@media (max-width: 992px) {
    .contacto-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 2rem;
        transition: 0.4s ease-in-out;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .navbar.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-btn {
        margin-top: 1rem;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
