/* ========================================
   CS TECHCO - ESTILOS PRINCIPALES
   ======================================== */

/* === CONFIGURACIÓN GLOBAL === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0066CC;
    --secondary-blue: #0052A3;
    --light-blue: #E6F2FF;
    --dark-text: #1a1a1a;
    --gray-text: #666;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --accent-gold: #FFB800;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-text);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === NAVEGACIÓN === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Menu Toggle para Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    transition: 0.3s;
    border-radius: 3px;
}

/* === HERO SECTION === */
.hero {
    margin-top: 85px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9) 0%, rgba(0, 82, 163, 0.85) 100%);
    z-index: 1;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 60px 20px;
    color: var(--white);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
    max-width: 900px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.hero-feature i {
    font-size: 20px;
    color: var(--accent-gold);
}

.hero-feature span {
    font-size: 15px;
    font-weight: 500;
}

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

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

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

/* === SECCIÓN DE CARACTERÍSTICAS === */
.features-section {
    padding: 100px 0;
    background: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-text);
    max-width: 700px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--white);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.15);
    border-color: var(--primary-blue);
}

.feature-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
}

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

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

.feature-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.7), rgba(0, 82, 163, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover .feature-image-overlay {
    opacity: 1;
}

.feature-image-overlay i {
    font-size: 48px;
    color: var(--white);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
    color: var(--primary-blue);
}

.feature-card h3 {
    font-size: 22px;
    margin: 25px 20px 15px 20px;
    color: var(--dark-text);
}

.feature-card p {
    color: var(--gray-text);
    line-height: 1.7;
    padding: 0 20px 30px 20px;
}

/* === PORTFOLIO/PROYECTOS SECTION === */
.portfolio-section {
    padding: 100px 0;
    background: var(--white);
}

.modules-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: var(--white);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    overflow: hidden;
}

.module-item:hover {
    border-color: var(--primary-blue);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.15);
}

.module-image-wrapper {
    position: relative;
    min-width: 180px;
    width: 180px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
}

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

.module-item:hover .module-image-wrapper img {
    transform: scale(1.1);
}

.module-icon-circle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.module-item:hover .module-icon-circle {
    transform: scale(1.15) rotate(10deg);
}

.module-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 600;
}

.module-info p {
    font-size: 14px;
    color: var(--gray-text);
    line-height: 1.5;
    margin: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 60px;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.2);
}

.project-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
}

.project-content {
    padding: 30px;
}

.project-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.project-card p {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* === STATS SECTION === */
.stats-section {
    padding: 100px 0;
    background: var(--primary-blue);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-top: 60px;
}

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

.stat-number {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-description {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.6;
}

/* === MÓDULOS/SKILLS SECTION === */
.modules-section {
    padding: 100px 0;
    background: var(--light-gray);
}

.modules-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.module-tab {
    padding: 12px 28px;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--dark-text);
}

.module-tab:hover,
.module-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

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

.module-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.module-card:hover {
    border-color: var(--primary-blue);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.15);
}

.module-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.module-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 12px;
}

.module-level {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.module-level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 3px;
    transition: width 1s ease;
}

/* === CONTACT SECTION === */
.contact-section {
    padding: 100px 0;
    background: var(--white);
}

.cta-buttons-center {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 50px 0 80px 0;
    flex-wrap: wrap;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-large i {
    font-size: 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.contact-card {
    background: var(--light-gray);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-text);
}

.contact-card:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-5px);
}

.contact-card:hover .contact-icon {
    background: var(--white);
    color: var(--primary-blue);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    transition: all 0.3s ease;
}

.contact-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-card p {
    font-size: 15px;
}

/* === FOOTER === */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 60px 0 30px;
}

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

.footer-col h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary-blue);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    font-size: 14px;
}

/* === LOADING ANIMATION === */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

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

.loader-logo img {
    width: 80px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 85px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .hero-feature {
        justify-content: center;
        text-align: center;
    }

    .section-title {
        font-size: 28px;
    }

    .projects-grid,
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .modules-list {
        grid-template-columns: 1fr;
    }
    
    .module-item {
        flex-direction: column;
        text-align: center;
    }
    
    .module-image-wrapper {
        width: 100%;
        max-width: 300px;
        height: 200px;
    }
    
    .feature-image {
        height: 180px;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .cta-buttons-center {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }

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