/* Base Styles & CSS Variables */
:root {
    --primary: #0A58CA;
    /* Deep Blue from Logo */
    --primary-light: #2C7BE5;
    --secondary: #00B48A;
    /* Green accent */
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-city {
    color: #0065e7;
}

.text-care {
    color: #00bbb0;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 140px;
}

.logo {
    width: 117px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition-smooth);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(10, 88, 202, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 88, 202, 0.4);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 190px 0 80px;
    min-height: 580px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #0f172a;
}

/* Background Rotator (hero-bg.jpg & hero-bg2.jpg at identical scale/crop) */
.hero-bg-rotator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.8s ease-in-out, transform 6s ease-out;
    z-index: 1;
}

.hero-bg-slide.active {
    opacity: 1;
    transform: scale(1.03);
    z-index: 2;
}

/* Recuadro semitransparente color blanco al 60% */
.hero-container {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-card {
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 52px 40px 40px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
}

.hero-card:hover {
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(10, 88, 202, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #334155;
    font-weight: 500;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.65;
}

.hero-icon-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card-icon {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(10, 88, 202, 0.15));
    transition: transform 0.4s ease;
}

.hero-card-icon:hover {
    transform: scale(1.06);
}

/* Features / Fundamento Section */
.features-section {
    padding: 0 0 60px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--surface);
    padding: 40px 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
    text-align: center;
}

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

.icon-circle {
    width: 72px;
    height: 72px;
    background: rgba(10, 88, 202, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Banner / Sustento Teórico */
.banner {
    background: var(--primary);
    color: white;
    padding: 24px 0;
    margin: 40px 0;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-logo-img {
    height: 38px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    display: block;
}

.banner-text {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 1.1rem;
}

.banner-text span {
    opacity: 0.9;
    font-weight: 300;
}

/* Image Section */
.image-section {
    padding: 20px 0 60px;
}

.image-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.1), 0 15px 15px -5px rgba(0, 0, 0, 0.04);
}

.feature-image {
    width: 100%;
    height: auto;
    display: block;
}

.main-carousel {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    user-select: none;
    background: #0f172a;
}

.swiper-slide {
    cursor: grab;
    overflow: hidden;
    position: relative;
}

.swiper-slide:active {
    cursor: grabbing;
}

.slide-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.slide-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    will-change: transform;
}

.slide-image-wrapper img,
.feature-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
}

.swiper-button-next,
.swiper-button-prev {
    color: #ffffff !important;
    background: #0A58CA !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99 !important;
    pointer-events: auto !important;
    box-shadow: 0 6px 16px rgba(10, 88, 202, 0.4) !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #0045a5 !important;
    transform: scale(1.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary) !important;
}

/* Steps / ¿Cómo funciona? */
.steps-section {
    padding: 100px 0;
    background: white;
}

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

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

.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    background: var(--surface);
    padding: 32px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 20px;
    width: 32px;
    height: 32px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 180, 138, 0.3);
}

.step-icon {
    width: 64px;
    height: 64px;
    background: rgba(10, 88, 202, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    transition: var(--transition-smooth);
}

.step:hover .step-icon {
    background: var(--primary);
    color: white;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Silver Economy Section */
.silver-economy-section {
    padding: 60px 0 100px;
    background: white;
}

.silver-economy-card {
    background: linear-gradient(135deg, rgba(10, 88, 202, 0.03) 0%, rgba(0, 180, 138, 0.03) 100%);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.silver-economy-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.silver-economy-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.silver-economy-card p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: justify;
}

/* Footer */
.footer {
    background: #0f172a;
    color: white;
    padding: 60px 0 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-logo img {
    height: 70px;
    max-width: 250px;
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-text {
    color: #94a3b8;
    font-size: 0.95rem;
}

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

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

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.delay-1 {
    transition-delay: 100ms;
}

.delay-2 {
    transition-delay: 200ms;
}

.delay-3 {
    transition-delay: 300ms;
}

.delay-4 {
    transition-delay: 400ms;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .timeline {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

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

    .main-nav {
        display: none;
        /* simple mobile approach */
    }

    .header-container {
        height: 100px;
        justify-content: center;
    }

    .logo {
        height: auto;
        max-height: 70px;
        max-width: 100%;
    }

    .hero {
        padding: 130px 16px 50px;
        min-height: auto;
    }

    .hero-card {
        padding: 36px 20px 28px;
        border-radius: 20px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 4px;
    }

    .hero-card-icon {
        width: 100px;
        height: 100px;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .footer-logo img {
        height: 52px;
        max-width: 200px;
        width: auto;
    }
}