﻿/* ============================================
   ESTILOS PARA INDEX - CARDS MODERNAS
   ============================================ */

/* Cards principales más compactas */
.hero-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: white;
}

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

.hero-card:hover::before {
    left: 100%;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(63, 65, 150, 0.2) !important;
}

/* Iconos más pequeños y compactos */
.hero-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #5256D8 0%, #3F4196 100%);
    box-shadow: 0 6px 12px rgba(82, 86, 216, 0.3);
    transition: all 0.3s ease;
}

.hero-card:hover .hero-card-icon {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 8px 16px rgba(82, 86, 216, 0.4);
}

.hero-card-icon i {
    color: white;
    font-size: 1.8rem;
}

/* Títulos y textos más compactos */
.hero-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem !important;
}

.hero-card .text-muted {
    font-size: 0.85rem;
}

/* Input groups más compactos */
.input-group-modern {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.input-group-modern:focus-within {
    box-shadow: 0 4px 12px rgba(82, 86, 216, 0.2);
    transform: translateY(-1px);
}

.input-group-modern .input-group-text {
    padding: 0.5rem 0.75rem;
}

.input-group-modern .form-control,
.input-group-modern .form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Botones más compactos */
.btn-modern {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    z-index: 1;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
}

.btn-modern::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;
    z-index: -1;
}

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

.btn-modern-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-modern-primary:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

.btn-modern-secondary {
    background: transparent;
    border-color: #e74c3c;
    color: #e74c3c;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
}

.btn-modern-secondary:hover {
    background: #e74c3c;
    color: white;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

/* Cards de servicios */
.service-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f0f0;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #5256D8, #3F4196);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: #5256D8;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(82, 86, 216, 0.15);
}

.service-icon {
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    color: #5256D8 !important;
}

/* Input groups modernos */
.input-group-modern {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.input-group-modern:focus-within {
    box-shadow: 0 6px 20px rgba(82, 86, 216, 0.2);
    transform: translateY(-2px);
}

/* Badges modernos */
.badge-modern {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sección header con gradiente */
.header-section {
    background: linear-gradient(135deg, #3f4196 0%, #2c3e50 100%);
    position: relative;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-card-icon {
        width: 60px;
        height: 60px;
    }

    .hero-card-icon i {
        font-size: 2rem;
    }
}

/* Barra de rastreo moderna y mejorada */
.tracking-search-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.tracking-search-card {
    background: white;
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.tracking-search-card:focus-within {
    box-shadow: 0 12px 40px rgba(82, 86, 216, 0.25);
    transform: translateY(-2px);
}

.tracking-icon {
    background: linear-gradient(135deg, #5256D8 0%, #3F4196 100%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    flex-shrink: 0;
}

.tracking-icon i {
    color: white;
    font-size: 1.1rem;
}

.tracking-input {
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px 15px;
    background: transparent;
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.tracking-input::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.tracking-input::-webkit-outer-spin-button,
.tracking-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tracking-input[type=number] {
    -moz-appearance: textfield;
}

.tracking-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-right: 3px;
    white-space: nowrap;
}

.tracking-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.tracking-btn:active {
    transform: scale(0.98);
}

.tracking-btn i {
    font-size: 1rem;
}

/* Header section más compacto */
.header-section {
    background: linear-gradient(135deg, #3f4196 0%, #2c3e50 100%);
    position: relative;
    padding: 3rem 0 !important;
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .hero-card-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }

    .hero-card-icon i {
        font-size: 1.5rem;
    }

    .hero-card .card-title {
        font-size: 1rem;
    }

    .hero-card .text-muted {
        font-size: 0.8rem;
    }

    .tracking-search-card {
        border-radius: 40px;
        padding: 5px;
    }

    .tracking-input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .tracking-icon {
        width: 35px;
        height: 35px;
    }

    .tracking-icon i {
        font-size: 1rem;
    }

    .tracking-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .tracking-btn span {
        display: none;
    }

    .tracking-btn i {
        margin: 0;
    }

    .header-section {
        padding: 2rem 0 !important;
    }
}

@media (max-width: 576px) {
    .tracking-search-wrapper {
        padding: 0 10px;
    }

    .input-group-modern .form-control,
    .input-group-modern .form-select {
        font-size: 0.85rem;
    }

    .btn-modern {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   PROMOCIONES CON REDES SOCIALES
======================================== */

/* Botón de compartir flotante */
.btn-share {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: none;
}

.btn-share:hover {
    transform: scale(1.1) rotate(15deg);
    background-color: #3F4196 !important;
    color: white !important;
}

.btn-share i {
    font-size: 1.2rem;
}

.promo-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
}

.promo-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.promo-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* Badge de vigencia mejorado */
.promo-validity {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.promo-validity i {
    font-size: 1rem;
    color: #ffc107;
}

/* Etiqueta "HOY" mejorada */
.promo-badge-hoy {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botón compartir mejorado */
.btn-share {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-share:hover {
    transform: scale(1.1) rotate(10deg);
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Contenido de la card */
.promo-card-body {
    padding: 1.5rem;
}

.promo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.promo-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Sección de información adicional */
.promo-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.promo-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #495057;
}

.promo-info-item i {
    font-size: 1.1rem;
    color: #5256D8;
    width: 24px;
    text-align: center;
}

/* Términos y condiciones */
.promo-terms-toggle {
    background: transparent;
    border: 1px dashed #dee2e6;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.promo-terms-toggle:hover {
    border-color: #5256D8;
    color: #5256D8;
    background: rgba(82, 86, 216, 0.05);
}

.promo-terms-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.promo-terms-content.show {
    max-height: 350px;
    overflow-y: auto;
    padding: 1rem;
}

.promo-terms-content ul {
    font-size: 0.85rem;
    color: #6c757d;
    padding-left: 1.5rem;
    margin: 0;
}

.promo-terms-content li {
    margin-bottom: 0.5rem;
}

/* Estilos para términos dinámicos */
.promo-terms-text {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.6;
}

.promo-terms-text p {
    margin-bottom: 0.5rem;
}

.promo-terms-text ul,
.promo-terms-text ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.promo-terms-text li {
    margin-bottom: 0.5rem;
}

.promo-terms-text strong {
    color: #495057;
    font-weight: 600;
}

/* Si viene HTML con estilos específicos */
.promo-terms-text h5,
.promo-terms-text h6 {
    color: #3F4196;
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Scroll suave si el contenido es muy largo */
.promo-terms-content.show {
    max-height: 350px;
    overflow-y: auto;
    padding: 1rem;
}

/* Scrollbar personalizado */
.promo-terms-content::-webkit-scrollbar {
    width: 6px;
}

.promo-terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.promo-terms-content::-webkit-scrollbar-thumb {
    background: #5256D8;
    border-radius: 10px;
}

.promo-terms-content::-webkit-scrollbar-thumb:hover {
    background: #3F4196;
}

/* Botón principal mejorado */
.btn-promo-redimir {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-promo-redimir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.btn-promo-redimir:active {
    transform: translateY(0);
}

/* Footer de la card */
.promo-card-footer {
    background: linear-gradient(to top, #f8f9fa 0%, white 100%);
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    text-align: center;
}

.promo-footer-text {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

/* Contador de días restantes */
.promo-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.promo-countdown.expires-soon {
    animation: pulseFast 1s infinite;
}

@keyframes pulseFast {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Modal de términos mejorado */
.modal-terms .modal-content {
    border-radius: 20px;
    border: none;
}

.modal-terms .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
}

.modal-terms .modal-body {
    padding: 2rem;
}

.terms-list {
    list-style: none;
    padding: 0;
}

.terms-list li {
    padding: 0.75rem;
    border-left: 3px solid #5256D8;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.terms-list li::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .promo-img {
        height: 220px;
    }
    
    .promo-badge-hoy {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .promo-validity {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}