/* =====================================
   MODERN THEME - VARIABLES & SISTEMA DE DISEÑO
   Púrpura/Violeta + Azul Vibrante
   ===================================== */

:root {
    /* Paleta Principal */
    --primary-dark: #6366f1;      /* Indigo vibrante */
    --primary-light: #818cf8;     /* Indigo más claro */
    --accent-purple: #8b5cf6;     /* Violeta */
    --accent-blue: #3b82f6;       /* Azul */
    --accent-cyan: #00d9ff;       /* Cyan brillante */

    /* Colores de Fondo */
    --bg-dark: #0f172a;           /* Azul muy oscuro */
    --bg-darker: #0a0f1f;         /* Más oscuro */
    --bg-light: #f8fafc;          /* Casi blanco */

    /* Colores de Texto */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-dark: #1e293b;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #3b82f6 100%);
    --gradient-light: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #60a5fa 100%);
    --gradient-dark: linear-gradient(135deg, #3b0764 0%, #1e3a8a 100%);

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(99, 102, 241, 0.1);
    --shadow-md: 0 8px 16px rgba(99, 102, 241, 0.2);
    --shadow-lg: 0 20px 40px rgba(99, 102, 241, 0.25);
    --shadow-xl: 0 25px 60px rgba(99, 102, 241, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================
   BODY & GENERAL STYLES
   ===================================== */

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-secondary);
    font-family: 'Segoe UI', Trebuchet MS, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Efecto de fondo animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Global Link Styles */
a {
    text-decoration: none !important;
    transition: var(--transition);
}

a i, a .fa, a [class*="fa-"] {
    text-decoration: none !important;
}

a:hover i, a:hover .fa, a:hover [class*="fa-"] {
    text-decoration: none !important;
}

/* =====================================
   NAVBAR - GLASSMORPHISM
   ===================================== */

.modern-navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.modern-navbar.sticky-top {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-brand img {
    height: 50px;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
    transition: var(--transition);
}

.navbar-brand:hover img {
    filter: drop-shadow(0 4px 16px rgba(139, 92, 246, 0.6));
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    position: relative;
    margin: 0 8px;
    transition: var(--transition);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--accent-cyan) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link.active {
    color: var(--accent-cyan) !important;
}

.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* =====================================
   TOP BAR
   ===================================== */

.top-bar {
    background: rgba(10, 15, 31, 0.8);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.top-number p {
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-number i {
    color: var(--accent-cyan);
    font-size: 18px;
}

/* Social Share Icons */
.social-share {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.social-share li a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 16px;
    text-decoration: none !important;
}

.social-share li a i {
    text-decoration: none !important;
}

.social-share li a:hover {
    background: var(--gradient-primary);
    border-color: var(--accent-cyan);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-lg);
    text-decoration: none !important;
}

.social-share li a:hover i {
    text-decoration: none !important;
}

/* =====================================
   SECCIONES - GLASSMORPHISM CARDS
   ===================================== */

section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.feature-wrap,
.services-wrap,
.widget {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-md);
}

.feature-wrap:hover,
.services-wrap:hover,
.widget:hover {
    background: var(--glass-bg);
    border-color: var(--accent-cyan);
    transform: translateY(-12px) rotateX(5deg);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(15px);
}

/* =====================================
   ICONOS & ELEMENTOS VISUALES
   ===================================== */

.feature-wrap i,
.services-wrap i {
    font-size: 48px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.feature-wrap:hover i {
    font-size: 56px;
    filter: drop-shadow(0 8px 16px rgba(139, 92, 246, 0.5));
}

/* =====================================
   HEADINGS & TYPOGRAPHY
   ===================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 48px;
    margin-bottom: 20px;
}

.lead {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* =====================================
   BOTONES & CTACTIONS
   ===================================== */

.btn-primary, .btn-slide, .btn, .request a {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
}

.btn-primary::before,
.btn-slide::before,
.btn::before,
.request a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-light);
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover,
.btn-slide:hover,
.btn:hover,
.request a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    color: white;
    text-decoration: none !important;
}

.btn-primary:hover::before,
.btn-slide:hover::before,
.btn:hover::before,
.request a:hover::before {
    left: 0;
}

.btn-transparent {
    border: 2px solid var(--accent-cyan);
    background: transparent;
    color: var(--accent-cyan);
}

.btn-transparent:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-lg);
}

/* =====================================
   CAROUSEL & SLIDER
   ===================================== */

.carousel {
    border-radius: 0;
    overflow: hidden;
    height: 600px;
}

.carousel-inner {
    height: 600px;
}

.carousel-item {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(59, 130, 246, 0.4) 100%);
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.6;
    }
}

.carousel-content {
    position: relative;
    z-index: 2;
    color: white;
}

.carousel-content h1 {
    font-size: 48px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    animation: slideInLeft 0.8s ease-out;
}

.carousel-content h2 {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================
   PORTAFOLIO & GRID ITEMS
   ===================================== */

.portfolio-items .portfolio-item {
    transition: var(--transition);
}

.recent-work-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    height: 280px;
}

.recent-work-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.recent-work-wrap .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-slow);
    z-index: 10;
}

.recent-work-wrap:hover .overlay {
    opacity: 1;
    backdrop-filter: blur(10px);
}

.recent-work-wrap:hover img {
    transform: scale(1.1);
}

.recent-work-inner {
    text-align: center;
    color: white;
}

.recent-work-inner h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.recent-work-inner p {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* =====================================
   FORMS & INPUTS
   ===================================== */

.form-control {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 12px 16px;
    transition: var(--transition);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* =====================================
   FOOTER
   ===================================== */

#bottom {
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0;
}

.widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.widget ul li a::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.widget ul li a:hover {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

.widget ul li a:hover::before {
    width: 100%;
}

#footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
    padding: 30px 0;
    color: var(--text-secondary);
}

#footer a {
    color: var(--accent-cyan);
    transition: var(--transition);
}

#footer a:hover {
    color: var(--accent-purple);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links li a {
    transition: var(--transition);
}

.footer-links li a:hover {
    transform: translateY(-3px);
}

/* =====================================
   ANIMACIONES AVANZADAS
   ===================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: var(--shadow-xl);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* =====================================
   RESPONSIVE
   ===================================== */

@media (max-width: 768px) {
    h2 {
        font-size: 32px;
    }

    .carousel-content h1 {
        font-size: 32px;
    }

    .carousel-content h2 {
        font-size: 18px;
    }

    .feature-wrap,
    .services-wrap {
        padding: 20px;
    }

    .navbar-nav {
        gap: 10px;
        margin-top: 15px;
    }

    .social {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
