/* ============================================
   ARCHIVO: assets/css/styles.css
   Cuponera Virtual — CAJASAN
   Versión limpia (solo lo que se usa)
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   1. RESET & BASE
============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ✅ Aplicar Poppins solo a elementos de texto */
body,
input, textarea, select, button,
h1, h2, h3, h4, h5, h6, p, span, a, label {
    font-family: 'Poppins', sans-serif;
}

body {
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9f9f9;
}

/* ============================================
   2. VARIABLES
============================================ */

:root {
    --primary-blue:    #2e427a;
    --secondary-blue:  #3e68af;
    --accent-blue:     #6B9BD1;
    --light-blue:      #E8F1F8;
    --dark-blue:       #1A2847;

    --blue-darker:     #1e2f5a;
    --blue-dark:       #243a6b;
    --blue-medium:     #4a7bc8;
    --blue-light:      #5a8dd6;
    --blue-lighter:    #7ba3e0;
    --blue-pale:       #a8c5f0;

    --blue-bg-light:   #e8eef7;
    --blue-bg-lighter: #f0f4fb;
    --blue-bg-pale:    #f7f9fd;

    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
}

/* ============================================
   3. FONT AWESOME — Fix de iconos
============================================ */

i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
}

i[class*="fab"] {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.feedback-btn i,
.hero-slider-btn-inline i {
    display: inline-block !important;
    font-size: inherit;
    line-height: inherit;
}

/* ============================================
   4. COLORES CAJASAN — Clases utilitarias
============================================ */

.bg-cajasan-blue   { background-color: #3e68af; }
.text-cajasan-blue { color: #2e427a; }
.bg-primary        { background: var(--primary-blue); }
.bg-secondary      { background: var(--secondary-blue); }
.text-primary      { color: var(--primary-blue); }
.text-secondary    { color: var(--secondary-blue); }

/* ============================================
   5. BOTONES GLOBALES
============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(46, 66, 122, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-darker) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 66, 122, 0.4);
}

/* ============================================
   6. HEADER / NAVEGACIÓN
============================================ */

#main-navigation {
    position: relative;
    width: 100%;
}

/* Barra de nav */
.main-nav {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
    padding: 0 1rem;
    max-width: 1280px;
}

.nav-menu-item {
    position: relative;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-menu-link i.fa-home       { font-size: 18px; }
.nav-menu-link i.fa-chevron-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-menu-item:hover .nav-menu-link {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu-item.has-dropdown:hover .nav-menu-link i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-menu-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    display: flex;
    padding: 32px;
    gap: 32px;
}

.dropdown-section  { flex: 1; }

.dropdown-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.dropdown-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-links li { margin-bottom: 8px; }

.dropdown-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-links a i {
    color: var(--secondary-blue);
    font-size: 16px;
    width: 20px;
}

.dropdown-links a:hover {
    background: var(--blue-bg-light);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.dropdown-images { display: flex; gap: 16px; }

.dropdown-image-card {
    position: relative;
    width: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.dropdown-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(255, 200, 0, 0.95);
    color: #111827;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    background: rgb(255, 200, 0);
    transform: translateY(-2px);
}

/* Menú móvil */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border: none;
    color: white;
    font-size: 24px;
    padding: 16px 20px;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.mobile-menu-close  { display: none; }
.mobile-menu-overlay { display: none; }

/* ============================================
   7. HERO SLIDER
============================================ */

.hero-section {
    position: relative;
    min-height: 180px;
    background-image: url("../images/home/fondo_slider_dos.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    padding-top: 0;
    margin-top: 0;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    min-height: 180px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Tipografía del slide */
.hero-slide h1 {
    font-size: 2.5rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--primary-blue);
}

.hero-slide p {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 520px;
    color: var(--dark-blue);
}

.hero-slide .text-white { padding-left: 60px; padding-right: 20px; }

.hero-slide .grid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Imagen orgánica */
.hero-image-wrapper-organic { position: relative; padding: 30px; }
.organic-image-container    { position: relative; z-index: 2; }

.organic-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    box-shadow: 0 25px 70px rgba(46, 66, 122, 0.4);
    animation: morph 10s ease-in-out infinite;
}

@keyframes morph {
    0%,100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25%      { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50%      { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75%      { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* Círculos decorativos del hero */
.hero-decorative-circles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.circle-decoration {
    position: absolute;
    border-radius: 50%;
    animation: floatUp 6s ease-in-out infinite;
}

.circle-decoration.large {
    width: 160px; height: 160px;
    top: -30px; left: -30px;
    background: var(--accent-blue);
    opacity: 0.5;
}
.circle-decoration.medium {
    width: 90px; height: 90px;
    top: 50px; right: -15px;
    border: 4px solid var(--secondary-blue);
    animation-delay: 1s;
}
.circle-decoration.small {
    width: 55px; height: 55px;
    bottom: 35px; right: 110px;
    background: var(--light-blue);
    opacity: 0.6;
    animation-delay: 2s;
}
.circle-decoration.outline {
    width: 120px; height: 120px;
    bottom: -25px; right: -25px;
    border: 3px solid var(--accent-blue);
    animation-delay: 1.5s;
}

@keyframes floatUp {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-15px) scale(1.03); }
}

/* Controles inferiores del slider */
.hero-bottom-controls {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-slider-btn-inline {
    width: 44px;
    height: 44px;
    background: var(--primary-blue);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-btn-inline:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(46, 66, 122, 0.3);
}

/* Dots */
.hero-slider-dots {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 30;
}

.hero-slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-slider-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-slider-dots .dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
    border-color: white;
}

/* Botón feedback */
.feedback-btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue);
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.feedback-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 66, 122, 0.3);
}

/* ============================================
   8. CARDS DE CUPONES
============================================ */

.coupon-grid { max-width: 1200px; }

.coupon-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
}

.coupon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 51, 102, 0.12);
}

/* Círculo de porcentaje */
.percentage-circle {
    background-color: #2e427a;
    color: white;
    font-weight: 800;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: absolute;
    bottom: -28px;
    left: 20px;
    z-index: 10;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Badge de marca (esquina imagen) */
.brand-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Lista de beneficios */
.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.benefit-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.4;
}

.benefit-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 1px;
    color: #003366;
    font-size: 0.65rem;
}

/* ============================================
   9. FOOTER
============================================ */

footer a { text-decoration: none; }

/* Carrusel de logos */
.footer-logos-carousel { max-width: 100%; }

.footer-logos-track {
    animation: scrollLogos 30s linear infinite;
}

.footer-logos-track:hover {
    animation-play-state: paused;
}

@keyframes scrollLogos {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   10. RESPONSIVE
============================================ */

/* ── Tablet 1024px ── */
@media (max-width: 1024px) {
    .nav-menu-link {
        padding: 16px 12px;
        font-size: 13px;
    }

    .dropdown-menu    { min-width: 500px; }
    .dropdown-content { padding: 24px; gap: 20px; }
    .dropdown-images  { flex-direction: column; }

    .hero-slide h1 { font-size: 2rem; }
    .hero-slide p  { font-size: 0.9375rem; max-width: 450px; }
    .hero-slide .text-white { padding-left: 30px; }

    .coupon-grid { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ── Mobile 768px ── */
@media (max-width: 768px) {

    /* Nav móvil */
    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 20px; right: 20px;
        background: none;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        z-index: 10001;
    }

    .main-nav { width: 100vw; left: 0; right: 0; margin: 0; }

    .nav-menu {
        position: fixed;
        top: 0; left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(180deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 0 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 10000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active { left: 0; }
    .nav-menu-item   { width: 100%; }

    .nav-menu-link {
        padding: 16px 24px;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu-item.has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 100%;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: rgba(0, 0, 0, 0.1);
    }

    .nav-menu-item.has-dropdown.active .dropdown-menu { max-height: 1000px; }

    .dropdown-content  { flex-direction: column; padding: 16px 24px; gap: 16px; }
    .dropdown-images   { display: none; }

    .dropdown-links a {
        padding: 12px 16px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
    }
    .dropdown-links a:hover  { background: rgba(255,255,255,0.1); color: white; }
    .dropdown-links a i      { color: rgba(255, 255, 255, 0.7); }
    .dropdown-title          { color: white; font-size: 12px; }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }
    .mobile-menu-overlay.active { display: block; }

    /* Hero */
    .hero-section  { min-height: 260px; background-position: center top; }
    .hero-slider   { min-height: 260px; }

    .hero-slide > div {
        padding-top: 30px !important;
        padding-bottom: 100px !important;
    }

    .hero-slide h1 { font-size: 1.75rem; line-height: 1.3; margin-bottom: 16px; }
    .hero-slide p  { font-size: 0.875rem; line-height: 1.6; margin-bottom: 24px; max-width: 100%; }
    .hero-slide .text-white { padding-left: 0; padding-right: 0; }
    .hero-slide .btn-primary { padding: 12px 28px; font-size: 14px; }

    .hero-image-wrapper-organic { padding: 15px; margin-top: 40px; }

    .circle-decoration.large  { width: 80px;  height: 80px;  top: -15px;  left: -15px; }
    .circle-decoration.medium { width: 60px;  height: 60px;  top: 40px;   right: -10px; }
    .circle-decoration.small  { width: 40px;  height: 40px;  bottom: 30px; right: 80px; }
    .circle-decoration.outline{ width: 70px;  height: 70px;  bottom: -15px; right: -15px; }

    .hero-bottom-controls {
        bottom: 15px; left: 15px; right: 15px;
        flex-wrap: nowrap; gap: 8px;
    }

    .hero-slider-btn-inline { width: 38px; height: 38px; font-size: 13px; flex-shrink: 0; }

    .hero-slider-dots        { bottom: 20px; gap: 8px; }
    .hero-slider-dots .dot   { width: 7px; height: 7px; }
    .hero-slider-dots .dot.active { width: 20px; }

    .feedback-btn {
        padding: 9px 16px;
        font-size: 11px;
        gap: 6px;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    /* Cards */
    .benefit-list li { font-size: 0.8rem; }

    /* Footer logos */
    .footer-logos-track { animation-duration: 20s; }
    .footer-logo-item img { height: 48px; }
}

/* ── Mobile pequeño 480px ── */
@media (max-width: 480px) {
    .hero-slider  { min-height: 220px; }
    .hero-slide h1 { font-size: 1.5rem; }
    .hero-slide p  { font-size: 0.8125rem; }

    .hero-bottom-controls {
        bottom: 12px;
        left: 50%; right: auto;
        transform: translateX(-50%);
        justify-content: center;
        max-width: 90%;
    }

    .feedback-btn span { display: none; }
    .feedback-btn {
        width: 38px; height: 38px;
        padding: 0;
        border-radius: 50%;
        flex: 0;
    }
    .feedback-btn i { margin: 0; }

    .hero-slider-dots { bottom: 65px; }

    /* Cards: imagen un poco más alta en móvil pequeño */
    .coupon-card .relative { height: 160px; }
}

/* ── Proteger Font Awesome ───────────────────── */
.fa, .fas, .far, .fal, .fab, .fa-solid,
.fa-regular, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
