/* ========================================
   MAIN LAYOUT - Page Sections & Styles
   ======================================== */

/* ===== NETWORK BACKGROUND ===== */

#network-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-base);
    pointer-events: none;
    opacity: 0.3;
}

/* ===== HEADER & NAVIGATION ===== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: var(--overlay-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--border-width) solid var(--glass-border);
    transition: all var(--transition-base);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-primary);
}

/* ===== HERO SECTION ===== */

#inicio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    padding-bottom: var(--space-3xl);
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
}



/* Organic blob shapes */
#inicio::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle,
            rgba(138, 43, 226, 0.4) 0%,
            rgba(75, 0, 130, 0.3) 40%,
            transparent 70%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(60px);
    animation: blob-float 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes blob-float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    25% {
        transform: translate(-50px, -30px) rotate(90deg);
        border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    }

    50% {
        transform: translate(-30px, 50px) rotate(180deg);
        border-radius: 30% 70% 60% 40% / 60% 40% 50% 50%;
    }

    75% {
        transform: translate(40px, -20px) rotate(270deg);
        border-radius: 70% 30% 40% 60% / 40% 60% 50% 50%;
    }
}

/* Secondary blob */
.hero-blob-secondary {
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
            rgba(0, 191, 255, 0.3) 0%,
            rgba(0, 150, 255, 0.2) 40%,
            transparent 70%);
    border-radius: 60% 40% 50% 50% / 70% 30% 60% 40%;
    filter: blur(50px);
    animation: blob-float-reverse 25s ease-in-out infinite;
    z-index: 0;
}

@keyframes blob-float-reverse {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, -40px) rotate(-180deg);
    }
}



/* Spacious content container - left aligned */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-2xl);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-3xl);
    text-align: left;
}

/* Small eyebrow text */
.hero-eyebrow {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-accent-cyan);
    margin-bottom: var(--space-md);
    font-weight: var(--weight-semibold);
}

/* Large, bold title - left aligned */
.hero-title {
    font-size: clamp(3rem, 7vw, 7rem);
    margin-bottom: var(--space-xl);
    line-height: 1.1;
    font-weight: var(--weight-black);
    color: #ffffff;
    max-width: 800px;
}

/* Subtitle with better spacing */
.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-3xl);
    max-width: 600px;
    line-height: 1.7;
}

/* CTA buttons - left aligned */
.hero-cta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

/* Neural network canvas for hero */
#hero-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

/* 3D Transformed Hero Image Container */
.hero-image-container {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 650px;
    height: 500px;
    perspective: 1500px;
    z-index: 2;
}

.hero-image-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: rgba(20, 20, 30, 0.8);
    border: 2px solid rgba(138, 43, 226, 0.4);
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Frame 1 - Front with image */
.hero-frame-1 {
    transform: rotateX(-15deg) rotateY(-25deg) rotateZ(2deg);
    z-index: 3;
    box-shadow:
        -25px 25px 60px rgba(0, 0, 0, 0.7),
        -8px 8px 30px rgba(138, 43, 226, 0.4);
}

.hero-frame-1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    display: block;
}

/* Frame 2 - Middle layer */
.hero-frame-2 {
    transform: rotateX(-15deg) rotateY(-25deg) rotateZ(2deg) translateZ(-40px) translateX(20px);
    z-index: 2;
    opacity: 1;
    background: rgba(40, 40, 60, 1);
    border-color: rgba(0, 191, 255, 0.8);
    border-width: 3px;
    box-shadow:
        -20px 20px 50px rgba(0, 0, 0, 0.6);
}

/* Frame 3 - Back layer */
.hero-frame-3 {
    transform: rotateX(-15deg) rotateY(-25deg) rotateZ(2deg) translateZ(-80px) translateX(40px);
    z-index: 1;
    opacity: 1;
    background: rgba(35, 35, 50, 1);
    border-color: rgba(138, 43, 226, 0.8);
    border-width: 3px;
    box-shadow:
        -15px 15px 40px rgba(0, 0, 0, 0.5);
}

/* Hover effect - spread the frames */
.hero-image-container:hover .hero-frame-1 {
    transform: rotateX(-12deg) rotateY(-22deg) rotateZ(1deg) translateZ(10px);
}

.hero-image-container:hover .hero-frame-2 {
    transform: rotateX(-12deg) rotateY(-22deg) rotateZ(1deg) translateZ(-45px) translateX(25px);
}

.hero-image-container:hover .hero-frame-3 {
    transform: rotateX(-12deg) rotateY(-22deg) rotateZ(1deg) translateZ(-90px) translateX(50px);
}

/* Floating animation */
@keyframes float-image {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(-52%);
    }
}

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

/* Responsive adjustments */
@media (max-width: 1380px) {
    .hero-image-container {
        width: 450px;
        height: 330px;
        right: 10%;
    }

    .hero-title {
        font-size: var(--text-5xl);
        max-width: 50%;
    }

    .hero-subtitle {
        font-size: var(--text-lg);
        max-width: 50%;
    }
}

@media (max-width: 1200px) {
    .hero-image-container {
        display: none;
    }

    .hero-title {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }
}

/* ===== SERVICES SECTION ===== */

#servicios {
    background: var(--color-bg-secondary);
    position: relative;
}

#servicios::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== ABOUT SECTION (NOSOTROS) ===== */

#nosotros {
    position: relative;
}

.about-content {
    max-width: 800px;
    margin: 0 auto var(--space-4xl);
    text-align: center;
}

.about-content p {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    text-align: center;
    padding: var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: var(--border-width) solid var(--glass-border);
    transition: all var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--glow-cyan);
}

.feature-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
    display: block;
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.feature-description {
    color: var(--color-text-secondary);
    font-size: var(--text-base);
}


/* ===== CONTACT SECTION ===== */

#contacto {
    background: var(--color-bg-secondary);
    position: relative;
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.contact-intro p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
}

.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: var(--space-3xl);
    border-radius: var(--radius-2xl);
    border: var(--border-width) solid var(--glass-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .service-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: var(--border-width) solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.service-option:hover {
    border-color: var(--color-accent-primary);
    background: var(--color-bg-elevated);
}

.service-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-accent-primary);
    cursor: pointer;
}

.service-option label {
    cursor: pointer;
    flex: 1;
    font-size: var(--text-sm);
}

/* ===== FOOTER ===== */

footer {
    background: var(--color-bg-primary);
    border-top: var(--border-width) solid var(--glass-border);
    padding: var(--space-4xl) 0 var(--space-xl);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
    max-width: var(--container-2xl);


}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section h4 {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-lg);
    color: var(--color-accent-primary);
}

.footer-section {
    padding-left: var(--space-3xl);
}

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

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-nav a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-nav a:hover {
    color: var(--color-accent-primary);
    transform: translateX(5px);
}

.footer-nav a::before {
    content: '→';
    color: var(--color-accent-primary);
    transition: transform var(--transition-fast);
}

.footer-nav a:hover::before {
    transform: translateX(3px);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: var(--border-width) solid var(--glass-border);
    transition: all var(--transition-base);
    font-size: var(--text-xl);
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-info-item {
    display: flex;
    align-items: start;
    gap: var(--space-md);
    color: var(--color-text-secondary);
}

.contact-info-item svg,
.contact-info-item .icon {
    color: var(--color-accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: var(--border-width) solid var(--glass-border);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.footer-logo {
    display: block;
    margin: 0 auto var(--space-lg);
    max-width: 200px;
    opacity: 0.8;
    transition: opacity var(--transition-base);
}

.footer-logo:hover {
    opacity: 1;
}

/* ===== SCROLL TO TOP BUTTON ===== */

/* ===== WHATSAPP FLOATING BUTTON ===== */

.whatsapp-float {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 60px;
    height: 60px;
    background: #25D366;
    /* WhatsApp green */
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-fixed);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    border: none;
}

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
    background: #20BA5A;
    /* Darker green on hover */
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Pulse animation for WhatsApp button */
@keyframes whatsapp-pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
}

.whatsapp-float.visible {
    animation: whatsapp-pulse 2s infinite;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}