/* Variables y reset - Heredado del archivo principal */
:root {
    --primary: #3a86ff;
    --primary-dark: #2667cc;
    --secondary: #ff006e;
    --dark: #0c0c1d;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #00b4d8;
    --gradient-primary: linear-gradient(135deg, var(--primary), #5e60ce);
    --gradient-accent: linear-gradient(135deg, var(--secondary), #fb5607);
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    
    /* Colores específicos para networking */
    --network-primary: #1e90ff;
    --network-secondary: #32cd32;
    --network-accent: #ff4500;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-accent);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    height: 5px;
    width: 80px;
    background: var(--gradient-primary);
    margin: 20px auto;
    border-radius: 5px;
}

/* Animaciones generales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(58, 134, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(58, 134, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(58, 134, 255, 0);
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border: 5px solid transparent;
    border-left-color: var(--network-secondary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(12, 12, 29, 0.95);
    box-shadow: var(--shadow);
    padding: 10px 0;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--light);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary);
}

.logo-icon {
    width: 35px;
    height: 35px;
    margin-right: 10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
}

.navbar .nav-links a {
    color: var(--light);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-accent);
    transition: var(--transition);
    border-radius: 5px;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--light);
    font-size: 1.5rem;
}

/* Hero Section - Networking específico */
.networking-hero {
    height: 100vh;
    background: linear-gradient(rgba(12, 12, 29, 0.9), rgba(12, 12, 29, 0.8)), 
                radial-gradient(circle at 30% 20%, rgba(30, 144, 255, 0.3), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(50, 205, 50, 0.3), transparent 50%);
    color: var(--light);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Animación de red de fondo */
.network-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.network-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--network-primary);
    border-radius: 50%;
    animation: networkPulse 3s ease-in-out infinite;
}

.network-node:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.network-node:nth-child(2) {
    top: 30%;
    right: 20%;
    animation-delay: 0.5s;
}

.network-node:nth-child(3) {
    bottom: 25%;
    left: 10%;
    animation-delay: 1s;
}

.network-node:nth-child(4) {
    bottom: 35%;
    right: 15%;
    animation-delay: 1.5s;
}

.network-node:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 2s;
}

.network-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--network-secondary), transparent);
    animation: dataFlow 4s linear infinite;
}

.network-connection:nth-child(6) {
    top: 22%;
    left: 15%;
    width: 300px;
    transform: rotate(15deg);
}

.network-connection:nth-child(7) {
    bottom: 27%;
    right: 20%;
    width: 250px;
    transform: rotate(-20deg);
    animation-delay: 1s;
}

.network-connection:nth-child(8) {
    top: 50%;
    left: 20%;
    width: 400px;
    transform: rotate(5deg);
    animation-delay: 2s;
}

@keyframes networkPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.7);
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(30, 144, 255, 0);
    }
}

@keyframes dataFlow {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100px) scale(0.5);
    }
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--network-secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    animation: fadeIn 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 30px;
    font-weight: 700;
    animation: fadeIn 0.8s ease 0.5s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    color: rgba(248, 249, 250, 0.8);
    animation: fadeIn 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    animation: fadeIn 0.8s ease 1.1s forwards;
    opacity: 0;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--light);
    animation: fadeIn 0.8s ease 1.5s forwards, bounce 2s ease infinite;
    opacity: 0;
    cursor: pointer;
}

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

/* Services Grid */
.services-overview {
    background-color: white;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background: var(--gradient-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    background-color: rgba(58, 134, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card > p {
    color: var(--gray);
    margin-bottom: 20px;
}

.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.service-card:hover .service-details {
    max-height: 200px;
}

.service-details ul {
    padding-top: 15px;
}

.service-details li {
    color: var(--gray);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.service-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--network-secondary);
    font-weight: bold;
}

/* Architecture Section */
.architecture {
    background-color: var(--light);
    position: relative;
}

.architecture-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.architecture-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.architecture-text h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--network-secondary);
    border-radius: 2px;
}

.architecture-text p {
    margin-bottom: 30px;
    color: var(--gray);
}

.architecture-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.arch-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.arch-feature:hover {
    transform: translateX(10px);
}

.arch-feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.arch-feature-content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.arch-feature-content p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Network Diagram */
.network-diagram {
    background: var(--dark);
    border-radius: var(--border-radius);
    padding: 30px;
    color: var(--light);
}

.diagram-layer {
    margin-bottom: 30px;
}

.diagram-layer:last-child {
    margin-bottom: 0;
}

.layer-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.device-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.network-device {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    min-width: 100px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.network-device:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--network-primary);
    transform: scale(1.05);
}

.network-device i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.network-device span {
    font-size: 0.8rem;
    font-weight: 500;
}

.core-switch {
    border-color: var(--network-secondary);
}

.dist-switch {
    border-color: var(--network-primary);
}

.access-switch {
    border-color: var(--network-accent);
}

.wifi-ap {
    border-color: #ffd700;
}

/* Technologies Section */
.technologies {
    background-color: var(--dark);
    color: var(--light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.tech-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.tech-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
}

.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.tech-item[data-tech="mikrotik"] .tech-icon {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.tech-item[data-tech="cisco"] .tech-icon {
    background: linear-gradient(135deg, #049fd9, #1ba0d7);
    color: white;
}

.tech-item[data-tech="fortinet"] .tech-icon {
    background: linear-gradient(135deg, #ee3124, #c5282f);
    color: white;
}

.tech-item[data-tech="ubiquiti"] .tech-icon {
    background: linear-gradient(135deg, #0080ff, #0066cc);
    color: white;
}

.tech-item[data-tech="squid"] .tech-icon {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
}

.tech-item[data-tech="openvpn"] .tech-icon {
    background: linear-gradient(135deg, #ea7e20, #d4671a);
    color: white;
}

.tech-item:hover .tech-icon {
    transform: rotateY(360deg);
}

.tech-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.tech-item p {
    color: rgba(248, 249, 250, 0.7);
    font-size: 0.9rem;
}

/* Process Timeline */
.process {
    background-color: white;
    position: relative;
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.timeline-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: var(--shadow);
}

.timeline-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    max-width: 350px;
    margin: 0 80px;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
}

.timeline-content p {
    color: var(--gray);
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(12, 12, 29, 0.9), rgba(12, 12, 29, 0.8)),
                radial-gradient(circle at 20% 20%, rgba(30, 144, 255, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(50, 205, 50, 0.3), transparent 50%);
    color: var(--light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-title.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.cta-description {
    margin-bottom: 40px;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-description.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-buttons.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-logo span {
    color: var(--secondary);
}

.footer-about {
    max-width: 300px;
}

.footer-about p {
    color: rgba(248, 249, 250, 0.7);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--secondary);
    border-radius: 5px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(248, 249, 250, 0.7);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover {
    color: var(--light);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(248, 249, 250, 0.7);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(248, 249, 250, 0.6);
    font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .network-connection {
        width: 200px !important;
    }
}

@media (max-width: 992px) {
    .architecture-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .network-diagram .device-row {
        justify-content: center;
    }
    
    .timeline-item {
        justify-content: center !important;
        flex-direction: column !important;
    }
    
    .timeline-content {
        margin: 20px 0 !important;
        max-width: 100%;
    }
    
    .process-timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background-color: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1001;
    }

    .navbar .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 1002;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-about {
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .network-node,
    .network-connection {
        display: none;
    }
}