/* =========================================
   CSS Variables & Theming
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #0a0e17;
    --bg-darker: #05080f;
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #ff007f;
    --text-main: #f0f4f8;
    --text-muted: #9ba4b5;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Typography & Utilities
   ========================================= */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 242, 254, 0.1);
    transform: translateY(-2px);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* =========================================
   Header & Navigation
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding var(--transition-normal);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.left-logo img {
    height: 40px; /* Aumentado para compensar el margen interno del isologo generado */
    mix-blend-mode: screen; /* Esto elimina el fondo negro del logo generado */
}

.logo img:hover {
    transform: scale(1.05);
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all var(--transition-normal);
    background-color: var(--text-main);
    border-radius: 2px;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a2235 0%, var(--bg-darker) 100%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.slogan {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.highlight {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero .btn {
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Orbs Animation */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: -100px;
    left: -100px;
    animation: floatOrb 10s infinite alternate ease-in-out;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation: floatOrb 12s infinite alternate-reverse ease-in-out;
}

/* =========================================
   Repositories Grid
   ========================================= */
.repositories {
    padding: 100px 0;
    position: relative;
    z-index: 2;
    background-color: var(--bg-dark);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.repo-card {
    padding: 30px;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.repo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.3);
}

.repo-img-container {
    margin-bottom: 20px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 10px;
    width: 100%;
}

.repo-img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

.repo-info h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.repo-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.placeholder-card {
    border: 1px dashed var(--glass-border);
    background: transparent;
    opacity: 0.7;
}

.placeholder-card:hover {
    border-color: var(--primary);
    opacity: 1;
}

.repo-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* =========================================
   Forms Section
   ========================================= */
.forms-section {
    padding: 80px 0 100px;
    background-color: var(--bg-darker);
    position: relative;
}

.forms-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-wrapper {
    padding: 40px;
}

.form-wrapper h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-group input,
.input-group textarea {
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 242, 254, 0.05);
}

.captcha-placeholder {
    padding: 10px;
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.captcha-placeholder small {
    color: var(--text-muted);
    margin-top: 5px;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.alert.success {
    background-color: rgba(0, 255, 127, 0.1);
    border: 1px solid #00ff7f;
    color: #00ff7f;
}

.alert.error {
    background-color: rgba(255, 0, 127, 0.1);
    border: 1px solid #ff007f;
    color: #ff007f;
}

/* =========================================
   Footer
   ========================================= */
.main-footer {
    background-color: #03050a;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-shdrive {
    height: 55px; /* Aumentado para que no se vea tan pequeño */
    mix-blend-mode: screen;
}

.footer-sudhosting {
    height: 25px;
    opacity: 0.8;
}

.main-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--primary);
}

.main-footer a:hover {
    text-decoration: underline;
}

/* =========================================
   Scroll to Top
   ========================================= */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--glass-shadow);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-5px);
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forms-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .main-nav {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 14, 23, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 20px 0;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .slogan {
        font-size: 2.5rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .logo.right-logo {
        display: none; /* Hide on small screens to save space or adjust as needed */
    }
}

@media (max-width: 480px) {
    .slogan {
        font-size: 2rem;
    }
    
    .form-wrapper {
        padding: 25px 20px;
    }
    
    .footer-logo {
        flex-direction: column;
        gap: 15px;
    }
}
