/* ==========================================================================
   Variables & Design System
   ========================================================================== */
   :root {
    /* Colors */
    --bg-dark: #050507;
    --bg-surface: #121217;
    --bg-glass: rgba(18, 18, 23, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --accent-primary: #0070F3;
    --accent-secondary: #7928CA;
    --accent-glow: rgba(0, 112, 243, 0.4);
    
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Transitions & Shadows */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-gradient {
    background: linear-gradient(to right, #0070F3, #7928CA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-primary-sm {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-surface);
    color: white;
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.btn-primary-sm:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    background: transparent;
    color: var(--text-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.w-full {
    width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(5, 5, 7, 0.75) 0%, rgba(5, 5, 7, 0.95) 100%), url('../assets/dev_bg.png') center/cover no-repeat;
    background-attachment: fixed;
}

.blob-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(121,40,202,0.15) 0%, rgba(0,112,243,0.1) 40%, rgba(5,5,7,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-glass);
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 24px;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-secondary);
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: 100px 20px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(18, 18, 23, 0.5) 100%);
    border-top: 1px solid var(--border-glass);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.detail-item svg {
    color: var(--accent-primary);
}

.contact-form {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    background: var(--bg-surface);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.animate-on-load {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   FAQ Accordion Section
   ========================================================================== */
.faq-section {
    padding: 100px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.faq-item.active {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 25px rgba(0, 112, 243, 0.15);
    background: rgba(18, 18, 23, 0.85);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    outline: none;
}

.faq-question span {
    padding-right: 15px;
    transition: var(--transition-smooth);
}

.faq-item:hover .faq-question span {
    color: var(--text-primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
    display: inline-block;
    line-height: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding-bottom: 24px;
}

.faq-answer strong {
    color: var(--accent-primary);
}

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white !important;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

.whatsapp-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(37, 211, 102, 0.4);
    border-radius: 50%;
    z-index: -1;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 900px) {
    .hero { 
        background-attachment: scroll; /* Soluciona el problema del fondo con zoom excesivo en móviles/tablets */
    }
    .hero h1 { font-size: 3rem; }
    .contact-container { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile hide for now, JS will toggle */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-glass);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger { display: flex; }
    
    .hero h1 { font-size: 2.5rem; }
    .hero-actions { flex-direction: column; }
    
    .contact-form { padding: 24px; }

    .whatsapp-float {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 55px !important;
        height: 55px !important;
        background: #25D366 !important;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
        z-index: 99999 !important;
    }
}
