/* ===================================
   ESDM PROYECTOS - GLOBAL STYLES
   =================================== */

/* ===================================
   ROOT VARIABLES & RESET
   =================================== */
:root {
    /* Colors */
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #3385ff;
    --primary-color-light-border: rgba(0, 102, 255, 0.3);
    --secondary-color: #00d4ff;
    --accent-color: #ff6b35;
    --dark-bg: #0a0e27;
    --dark-bg-secondary: #141830;
    --dark-bg-tertiary: #1e2545;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #0a0e27 0%, #1e2545 100%);
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 15px;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --glow-primary: 0 0 30px rgba(0, 102, 255, 0.4);
    --glow-secondary: 0 0 30px rgba(0, 212, 255, 0.4);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
}

#nosotros .lead {
    color: rgba(255, 255, 255, 0.85);
}

/* ===================================
   UTILITIES
   =================================== */
.section-padding {
    padding: var(--section-padding);
}

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

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    box-shadow: var(--glow-primary);
}

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

.section-title {
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    color: var(--white);
}

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

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-hover:hover::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   UTILITIES & HELPERS
   =================================== */
.bg-dark {
    background: var(--dark-bg) !important;
}

.bg-light {
    background: var(--light-bg) !important;
}

.text-white {
    color: var(--white) !important;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1199px) {
    .hero-image {
        height: 400px;
    }
    
    .floating-card {
        padding: 15px 20px;
    }
    
    .floating-card span {
        font-size: 0.85rem;
    }
}

@media (max-width: 991px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .navbar-collapse {
        background: rgba(10, 14, 39, 0.98);
        padding: 20px;
        border-radius: var(--radius-md);
        margin-top: 15px;
    }
    
    .hero-image {
        height: 350px;
        margin-top: 40px;
    }
    
    .floating-card {
        padding: 12px 16px;
    }
    
    .floating-card i {
        font-size: 1.5rem;
    }
    
    .about-content {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .contact-info {
        padding-right: 0;
        margin-bottom: 40px;
    }
}

@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: space-around;
        gap: 20px;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .floating-card {
        padding: 10px 15px;
    }
    
    .floating-card span {
        font-size: 0.75rem;
    }
    
    .floating-card.card-1 {
        top: 5%;
        left: 5%;
    }
    
    .floating-card.card-2 {
        top: 45%;
        right: 2%;
    }
    
    .floating-card.card-3 {
        bottom: 10%;
        left: 2%;
    }
    
    .floating-card.card-4 {
        top: 25%;
        right: 20%;
    }
    
    .service-card,
    .advantage-card,
    .feature-box {
        margin-bottom: 20px;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 575px) {
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .contact-form-wrapper {
        padding: 25px;
    }
}