/* ============================================
   PREDICTIVO PLUS - PREMIUM DESIGN SYSTEM
   Redesigned by Equipo EdiBot (Frontend)
   ============================================ */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Montserrat:wght@400;600;700;800;900&display=swap');

/* ============ DESIGN TOKENS ============ */
:root {
    /* Brand Colors */
    --primary: #0a1628;
    --primary-light: #1b2d4a;
    --accent: #00b4d8;
    --accent-glow: rgba(0, 180, 216, 0.35);
    --accent-dark: #0090ab;
    --teal: #00cfb4;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #00b4d8, #00cfb4);
    --gradient-hero: linear-gradient(135deg, rgba(10, 22, 40, 0.92), rgba(0, 90, 120, 0.85));
    --gradient-card-border: linear-gradient(135deg, rgba(0, 180, 216, 0.4), rgba(0, 207, 180, 0.1));
    --gradient-text: linear-gradient(135deg, #00b4d8, #00cfb4);

    /* Neutrals */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-body: #ffffff;
    --bg-section: #f7f9fc;
    --bg-card: rgba(255, 255, 255, 0.85);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);

    /* Spacing & Misc */
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 20px 50px rgba(0, 180, 216, 0.12);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

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

ul { list-style: none; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============ UTILITIES ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 2rem;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.grid {
    display: grid;
    gap: 2rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title span {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    display: inline-block;
    margin-bottom: 0.75rem;
    position: relative;
}

.section-title span::before,
.section-title span::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-title span::before { right: calc(100% + 12px); }
.section-title span::after { left: calc(100% + 12px); }

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.bg-light {
    background: var(--bg-section);
}

/* ============ HEADER & NAV ============ */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.site-header.scrolled .logo img {
    height: 38px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

.logo img {
    height: 50px;
    transition: height 0.4s ease;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
    color: var(--primary);
    padding: 0.3rem 0;
}

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

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

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* ============ HERO SECTION ============ */
.hero {
    background: var(--gradient-hero), url('../img/nosotros-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92vh;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 207, 180, 0.08) 0%, transparent 50%);
    z-index: 1;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: #fff;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.hero h1 .typed-text {
    color: var(--accent);
    display: inline;
}

.hero h1 .typed-cursor {
    color: var(--accent);
    font-weight: 100;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 2rem;
    background: var(--gradient-accent);
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-client {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--accent);
    box-shadow: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
}

.btn-client:hover {
    background: var(--gradient-accent);
    color: #fff !important;
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ============ STATS SECTION ============ */
.stats-section {
    background: var(--primary);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    color: #fff;
    padding: 2rem 1rem;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    font-weight: 500;
}

/* ============ SERVICE CARDS ============ */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 180, 216, 0.08);
    box-shadow: var(--shadow-card);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(0, 180, 216, 0.2);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(0, 207, 180, 0.05));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: var(--accent);
    transition: all 0.4s ease;
}

.card:hover .card-icon {
    background: var(--gradient-accent);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============ ABOUT PREVIEW ============ */
.about-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

.about-text .section-title span::before { display: none; }

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: var(--radius);
    z-index: -1;
    opacity: 0.3;
}

/* ============ TRUST / CLIENTS ============ */
.trust-section {
    padding: 5rem 2rem;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
    align-items: center;
    justify-items: center;
}

.trust-grid img {
    max-height: 50px;
    width: auto;
    max-width: 130px;
    filter: grayscale(100%) brightness(1.2) opacity(0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: contain;
}

.trust-grid img:hover {
    filter: grayscale(0%) brightness(1) opacity(1);
    transform: scale(1.15);
}

/* ============ WHATSAPP FAB ============ */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: fab-pulse 2s infinite;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* ============ SCROLL ANIMATIONS ============ */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Staggered cards */
.card.animate-in {
    opacity: 0;
    transform: translateY(30px);
}

.card.animate-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 2rem 1.5rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
}

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

.footer-column h4 {
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-column li {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-column i {
    color: var(--accent);
    font-size: 0.85rem;
    width: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============ NOSOTROS PAGE ============ */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.text-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-content h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.image-content img {
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    width: 100%;
    height: auto;
    object-fit: cover;
}

.intro-text {
    max-width: 900px;
    margin: 4rem auto 0;
    text-align: center;
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 180, 216, 0.08);
}

.intro-text p {
    color: var(--text-secondary);
}

/* ============ BLOG CARDS ============ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-content {
    padding: 1.5rem 2rem 2rem;
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.blog-card-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-text {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-text:hover {
    gap: 12px;
    color: var(--accent-dark);
}

/* ============ CUSTOM CURSOR ============ */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, transform 0.15s, opacity 0.3s;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 180, 216, 0.3);
    font-size: 30px;
}

.cursor-follower::before {
    content: '\f013';
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cursor.active::after {
    content: '\f0e7';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    background-color: transparent;
    color: #ffcc00;
    box-shadow: none;
    width: auto;
    height: auto;
    font-size: 18px;
    animation: flash-bolt 0.8s infinite alternate;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    color: var(--accent);
    opacity: 1;
}

.cursor-follower.active::before {
    font-size: 45px;
    animation: spin-fast 1.5s linear infinite;
}

@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes flash-bolt {
    0% { opacity: 0.8; }
    100% { opacity: 1; text-shadow: 0 0 15px #ffcc00; }
}

.cursor::before { display: none; }

@media (min-width: 992px) {
    body { cursor: none; }
    a, button, .btn { cursor: none; }
}

/* ============ DESKTOP GRID ============ */
@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid > :last-child {
        grid-column: 2;
    }

    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============ TABLET ============ */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }

    .hero { min-height: 70vh; padding: 3rem 1rem; background-attachment: scroll; }

    .section-padding { padding: 4rem 1rem; }

    .section-title h2 { font-size: 1.8rem; }

    .about-preview {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image::before { display: none; }

    .nav-container { flex-wrap: wrap; }

    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
        background: #fff;
        padding: 1.5rem;
        border-radius: var(--radius-sm);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active { display: block; }

    .main-nav ul {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .main-nav ul li { width: 100%; }

    .main-nav a,
    .btn-client {
        display: block;
        width: 100%;
        text-align: left;
    }

    .btn-client {
        display: inline-flex;
        justify-content: flex-start;
    }

    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-number { font-size: 2.5rem; }

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

@media (max-width: 480px) {
    .logo img { height: 35px; }
    .hero h1 { font-size: 1.8rem; }
    .stat-number { font-size: 2rem; }
}