/* ===========================================
   EstudioTech - Premium Design System 2025
   Theme: Modern, Elegant, Impactful Consultant
   =========================================== */

/* 1. Reset & Variables */
:root {
    /* Colors - Clean & Premium Light Tech */
    /* Backgrounds */
    --bg-main: #FFFFFF;
    /* Pure White */
    --bg-secondary: #F8FAFC;
    /* Very Light Gray/Blueish */
    --bg-card: #FFFFFF;
    /* White cards */
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Text */
    --text-primary: #111827;
    /* Almost Black */
    --text-secondary: #4B5563;
    /* Dark Gray */
    --text-muted: #6B7280;
    /* Medium Gray */
    --text-accent: #6366f1;
    /* Primary Color for accents */
    --text-light: #FFFFFF;
    /* For text on dark backgrounds/buttons */

    /* Brand Accents */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-glow: rgba(99, 102, 241, 0.2);
    --secondary: #a855f7;
    /* Purple 500 */
    --accent: #06b6d4;
    /* Cyan 500 */

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-dark: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    /* Inverted to match light flow */
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 100%);
    --gradient-border: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
    --gradient-text: linear-gradient(135deg, #1e1b4b 0%, #3b0764 100%);
    /* Much darker: Indigo 950 to Purple 950 */

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-logo: 'Grape Nuts', cursive;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* UI Elements */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    /* Added for better light mode depth */
    --shadow-glow: 0 10px 30px rgba(99, 102, 241, 0.15);
    /* Softer glow */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Setup */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.caption {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-accent);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: inline-block;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
}

.list-steps {
    list-style: none;
    padding: 0;
    counter-reset: steps;
}

.list-steps li {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.list-steps li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.list-steps li::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gradient-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* 2. Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.75rem;
}

.btn-primary {
    background: var(--primary);
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 200%;
    }
}

.btn-secondary {
    background: white;
    border: 1px solid #E5E7EB;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Fix for dark backgrounds */
.section-dark .btn-secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Navbar - Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    /* Above menu */
    padding: 0;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Image Centering */
.card-image-centered {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 16/9;
    margin: 0 auto 2rem auto;
    object-fit: cover;
    display: block;
    border-radius: 1rem;
    /* Slightly more rounded for premium feel */
    box-shadow: var(--shadow-sm);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: var(--transition);
}

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

/* Logo Styles */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    transition: var(--transition);
}

.logo-text {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.5rem;
    line-height: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--primary);
    /* Fallback to ensure visibility if clip fails */
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Standard property */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.logo-highlight {
    color: var(--primary);
    font-family: var(--font-logo);
}

/* Navbar Menu */
.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        height: 100vh;
        background: #ffffff;
        /* Solid background to ensure visibility */
        backdrop-filter: none;
        /* SQL: Remove blur to avoid rendering issues */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        gap: 2rem;
        z-index: 1001;
        /* Ensure it lies on top of everything but the toggle */
        display: flex !important;
        /* Force display flex */
    }

    .nav-menu.active {
        right: 0;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Typography Spacing Fixes */
    .hero-title {
        font-size: 2.5rem;
        /* Smaller hero title on mobile */
    }

    .section {
        padding: 4rem 0;
        /* Reduce section padding */
    }

    .card {
        padding: 1.5rem;
        text-align: center;
        /* Generally center content on mobile for better flow */
    }

    .card-title {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        margin-bottom: 3rem;
        /* Provide space before grid */
    }

    .grid-2,
    .grid-3 {
        gap: 3rem;
        /* Increase gap between stacked items */
    }
}

/* 3. Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

/* Hero */
.section-highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Abstract Background Glows */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    animation: float 6s ease-in-out infinite;
    width: 100%;
    max-width: 600px;
    /* Constraint */
    /* Constraint */
    margin: 0 auto;
    /* Fix alignment */
    display: block;
    line-height: 0;
}

.hero-carousel {
    aspect-ratio: 4/3;
    /* Enforce height since children are absolute */
}

.hero-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: carouselFade 18s infinite ease-in-out;
}

.hero-carousel img:nth-child(1) {
    animation-delay: 0s;
}

.hero-carousel img:nth-child(2) {
    animation-delay: 6s;
}

.hero-carousel img:nth-child(3) {
    animation-delay: 12s;
}

@keyframes carouselFade {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    33% {
        opacity: 1;
    }

    40% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .hero-buttons {
        justify-content: center;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Trust Bar */
.trust-bar {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.trust-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards (Sectores, Services) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card:not(form):hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
}

/* Card Glow Effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.card:not(form):hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--primary);
    color: white;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Benefits */
.benefit-card {
    text-align: center;
    padding: 2.5rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-5px);
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: var(--accent);
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    background: var(--gradient-main);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.icon-circle svg {
    width: 40px;
    height: 40px;
    color: white;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: #F8FAFC;
    padding: 6rem 0 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-heading {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links li a {
    color: var(--text-muted);
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Helper for Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }

    .hero-container,
    .grid-3,
    .grid-2,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero {
        padding-top: 80px;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .trust-bar {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .nav-menu {
        display: none;
        /* Mobile menu handling needed if JS wants it, or just hide for now */
    }

    h1 {
        font-size: 2.5rem;
    }
}