/* ===================================
   Variables CSS
   =================================== */
:root {
    --primary-color: #0066FF;
    --secondary-color: #00FF88;
    --dark-bg: #0a0e27;
    --darker-bg: #050814;
    --text-white: #ffffff;
    --text-gray: #b8c5d6;
    --navbar-height: 80px;
    --navbar-height-scrolled: 60px;
    --transition-speed: 0.4s;
}

/* ===================================
   Reset y Estilos Generales
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===================================
   Navbar Styles
   =================================== */
.navbar {
    padding: 1.5rem 0;
    transition: all var(--transition-speed) ease;
    background-color: transparent;
    z-index: 1000;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    transition: all var(--transition-speed) ease;
    opacity: 0;
    transform: scale(0.8);
}

.navbar.scrolled .navbar-brand {
    opacity: 1;
    transform: scale(1);
}

.navbar-brand img {
    height: 60px;
    transition: all var(--transition-speed) ease;
}

.navbar.scrolled .navbar-brand img {
    height: 65px;
}

.logo-white {
    display: none;
}

.logo-color {
    display: none;
}

.navbar.scrolled .logo-white {
    display: none;
}

.navbar.scrolled .logo-color {
    display: block;
}

.navbar-nav .nav-link {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar.scrolled .navbar-nav .nav-link {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.navbar-nav .nav-link.active {
    color: var(--text-white);
}

.navbar.scrolled .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

.navbar.scrolled .navbar-nav .nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 102, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, var(--dark-bg) 100%);
    z-index: 3;
    pointer-events: none;
}

.tech-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.3) 0%, rgba(10, 14, 39, 0.8) 100%);
    perspective: 1000px;
}

.tech-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    animation: ambientGlow 10s ease-in-out infinite;
}

.tech-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.9) 0%, transparent 100%);
    z-index: 2;
}

@keyframes ambientGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes serverBlink {
    0%, 90%, 100% {
        opacity: 0.3;
    }
    95% {
        opacity: 1;
    }
}

@keyframes dataPulse {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(var(--tx)) translateY(var(--ty));
        opacity: 0;
    }
}

.hero-section .container {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-gray);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-gray);
    animation: fadeInUp 1s ease 0.6s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Somos Section
   =================================== */
.somos-section {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    padding: 100px 0;
}

.somos-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2rem;
}

.somos-text {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===================================
   Valores Section
   =================================== */
.valores-section {
    background: var(--darker-bg);
    padding: 100px 0;
}

.valor-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 255, 136, 0.1);
    height: 100%;
}

.valor-card:hover {
    transform: translateY(-10px);
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
}

.valor-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.valor-card:hover .valor-icon {
    transform: scale(1.1) rotateY(360deg);
    color: var(--primary-color);
}

.valor-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0;
}

/* ===================================
   Servicios Section
   =================================== */
.servicios-section {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    padding: 100px 0;
}

.service-card {
    height: 100%;
    perspective: 1000px;
}

.service-card-inner {
    position: relative;
    height: 100%;
    min-height: 280px;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052cc 100%);
    border-radius: 15px;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card-inner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.service-card:hover .service-card-inner {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 255, 136, 0.5);
}

.service-card:hover .service-card-inner::before {
    opacity: 1;
}

.service-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-align: center;
}

.service-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===================================
   Contacto Section
   =================================== */
.contacto-section {
    background: var(--dark-bg);
    padding: 100px 0;
}

.contacto-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
}

.contact-info-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    transition: all 0.4s ease;
}

.contact-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 50px rgba(0, 255, 136, 0.4);
}

.contact-cta {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.contact-link {
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.contact-link:hover {
    color: var(--secondary-color);
}

.contact-link:hover::after {
    width: 100%;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.footer-logo {
    max-width: 150px;
    height: auto;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-link {
    color: var(--text-white);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(10, 14, 39, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }
    
    .navbar.scrolled .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-logo {
        max-width: 300px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .service-description {
        font-size: 0.95rem;
    }
    
    .contact-cta {
        font-size: 1.5rem;
    }
    
    .hero-logo {
        max-width: 250px;
    }
    
    .somos-logo {
        max-width: 200px;
    }
}

@media (max-width: 575px) {
    .hero-section {
        padding: 0 15px;
    }
    
    .navbar-brand img {
        height: 50px;
    }
    
    .navbar.scrolled .navbar-brand img {
        height: 40px;
    }
    
    .service-card-inner {
        min-height: 250px;
        padding: 2rem 1.5rem;
    }
    
    .contact-info-box {
        padding: 2rem 1.5rem;
    }
    
    .contact-item {
        font-size: 1rem;
    }
    
    .contact-item i {
        font-size: 1.2rem;
    }
}

/* ===================================
   Animaciones adicionales
   =================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-logo {
    animation: float 6s ease-in-out infinite;
}

/* Smooth scroll offset para navbar fijo */
section {
    scroll-margin-top: 80px;
}
