/* 
 * Estilos específicos para la vista index.php (Home)
 * Roleplay Challenge
 * Versión 1.1
 */

/* Botones específicos para las tarjetas de roleplay */
.btn-sm-card {
    font-size: 13px;
}

/* Tarjetas */
.card {
    background-color: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    margin-bottom: 20px;
    border: 1px solid #d4d6ef;
    display: flex;
    flex-direction: column;
    height: 100%;
}
body.dark .card {
    background-color: #0B0650;
    border-color: rgba(177, 59, 255, 0.25);
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.card-img-top {
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.7;
    margin-top: 0;
    display: block;
    object-position: top;
}

.card-body {
    padding: 20px;
    font-size: 14px;
    flex: 1;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-text {
    margin-bottom: 15px;
    color: var(--gray-600);
}

.card-footer {
    background-color: var(--gray-100);
    padding: 12px 15px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
body.dark .card-footer { background-color: rgba(9,0,64,0.35); border-top-color: var(--gray-300); }

.card-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.card-meta {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0 8px;
}

/* Estilos para el Footer */
.footer {
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--gray-700);
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 15px;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    font-size: 0.9rem;
    text-align: center;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-base) ease;
    display: inline-flex;
    align-items: center;
}

.footer-section a i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.company-info .disclaimer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.contact-email {
    align-items: center;
    gap: 0.5rem;
}

.footer-feedback {
    flex: 2;
    min-width: 300px;
}

.feedback-message {
    padding: 1rem;
    background-color: #f1f8ff;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
body.dark .footer-section.footer-feedback .feedback-message {
    background-color: rgba(177, 59, 255, 0.12);
    border: 1px solid rgba(177, 59, 255, 0.25);
    color: var(--gray-800);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Estilos para el carrusel de tarjetas */
#roleplay-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Search bar */
.search-form .search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-form .form-control {
    flex: 1;
}

/* Hero landing */
.hero-landing .hero-content { text-align: center; padding: 10px 8px; }
.hero-landing .hero-centered { margin: 0 auto; }
.hero-landing h1 { line-height: 1.25; color: var(--primary-color); }
.hero-subtitle { margin-top: 10px; color: var(--gray-700); }
.hero-ctas { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-ctas--center { justify-content: center; }
.btn-hero { padding: 10px 18px; }
.hero-trust { margin-top: 12px; display: flex; gap: 10px; color: var(--gray-600); font-size: 0.95rem; justify-content: center; flex-wrap: wrap; }
.chip { background: #f3f5ff; border: 1px solid var(--gray-200); padding: 6px 10px; border-radius: 20px; display: inline-flex; gap: 8px; align-items: center; }
body.dark .chip { background: rgba(177,59,255,0.12); border-color: rgba(177,59,255,0.25); color: var(--gray-800); }

/* Trust badges */
.trust-badges { display: flex; justify-content: center; gap: 20px; }
.trust-badges .trust-item { display: inline-flex; gap: 8px; align-items: center; color: var(--gray-700); padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 999px; background: linear-gradient(90deg, rgba(46,60,139,0.1) 0%, rgba(246,164,55,0.08) 100%); }
.trust-badges .trust-item i { color: var(--primary-color); }
body.dark .trust-badges .trust-item { background: linear-gradient(90deg, rgba(177,59,255,0.12) 0%, rgba(255,204,0,0.12) 100%); border-color: rgba(177,59,255,0.25); color: var(--gray-800); }

/* How it works */
.section-title { color: var(--primary-color); margin-bottom: 12px; }
.hero-landing, .trust-badges, .how-it-works, .benefits-section, .testimonials-section, .cta-banner, .faq-section { margin-top: 80px; margin-bottom: 80px; }
.hero-landing { margin-top: 10px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 16px; text-align: center; }
.step-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(46,60,139,0.08); color: var(--primary-color); margin: 0 auto 10px; }
body.dark .step-card { background: #0B0650; border-color: rgba(177,59,255,0.25); }
body.dark .step-icon { background: rgba(177,59,255,0.12); color: var(--primary-color); }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.testimonial-card { background: #ffffff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px; position: relative; }
.testimonial-icon { position: absolute; top: -12px; left: -12px; width: 36px; height: 36px; border-radius: 50%; background: #f0f7ff; color: var(--primary-color); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.testimonial-author { margin-top: 10px; color: var(--gray-700); font-weight: 600; }
body.dark .testimonial-card { background: #0B0650; border-color: rgba(177,59,255,0.25); }
body.dark .testimonial-icon { background: rgba(177,59,255,0.12); color: var(--primary-color); }

/* CTA banner */
.cta-banner { display: grid; place-items: center; }
.cta-inner { width: 100%; max-width: 900px; background: linear-gradient(90deg, rgba(46,60,139,0.1) 0%, rgba(246,164,55,0.08) 100%); border: 1px solid var(--gray-200); border-radius: 14px; padding: 22px; text-align: center; }
body.dark .cta-inner { background: linear-gradient(90deg, rgba(177,59,255,0.12) 0%, rgba(255,204,0,0.12) 100%); border-color: rgba(177,59,255,0.25); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.faq-grid details { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px 16px; }
.faq-grid summary { cursor: pointer; color: var(--primary-color); display: flex; gap: 8px; align-items: center; font-weight: 600; }
.faq-grid details[open] { border-color: var(--primary-color); }
body.dark .faq-grid details { background: #0B0650; border-color: rgba(177,59,255,0.25); }

/* Responsive */
@media (max-width: 992px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  /* Espaciado general */
  .hero-landing, .trust-badges, .how-it-works, .benefits-section, .testimonials-section, .cta-banner, .faq-section { margin-bottom: 48px; }

  /* Hero compacto y centrado */
  .hero-landing .hero-centered { padding: 0 10px; }
  .hero-landing h1 { font-size: 2.5rem; line-height: 1.2; }
  .hero-subtitle { font-size: 0.95rem; line-height: 1.5; }
  .hero-ctas { gap: 8px; }
  .hero-ctas .btn { width: 100%; }

  /* Trust badges responsive */
  .trust-badges { padding: 0 10px; flex-wrap: wrap; gap: 10px; }
  .trust-badges .trust-item { width: 100%; justify-content: center; }

  /* Buscador: disposición vertical */
  .search-form .search-row { flex-direction: column; align-items: stretch; }
  #search-btn { width: 100%; }

  /* How it works: 1 columna, iconos más compactos */
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .step-card { padding: 14px; }
  .step-icon { width: 40px; height: 40px; }

  /* Beneficios: 1 columna, mejor lectura */
  .benefits-section .benefits-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .benefit-box { padding: 14px; }
  .benefit-box .icon-container { width: 60px; height: 60px; }

  /* Testimonios: 1 por fila */
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-card { padding: 14px; }

  /* CTA banner: compacto y CTA ancho completo */
  .cta-inner { margin: 0 10px; padding: 16px; }
  .cta-inner .btn { width: 100%; }

  /* FAQ: ya a 1 col, ajustar padding */
  .faq-grid details { padding: 10px 12px; }
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding-bottom: 20px;
    padding-top: 20px;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.carousel-inner .card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin-bottom: 0;
}

.carousel-control {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 37px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base) ease;
    margin: 0 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
body.dark .carousel-control { background-color: #B13BFF; }

.carousel-control:hover {
    background-color: #445ca3;
    transform: scale(1.1);
}

.carousel-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-control i {
    font-size: 18px;
}

/* Indicadores del carrusel */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.carousel-indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Estilos para la sección de beneficios */
.benefits-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.benefit-box {
    flex: 1;
    min-width: 220px;
    background-color: white;
    border-radius: var(--border-radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-base) ease, box-shadow var(--transition-base) ease;
}
body.dark .benefit-box { background-color: #0B0650; border: 1px solid rgba(177,59,255,0.2); }

.benefit-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.benefit-box .icon-container {
    background-color: #fdeeda;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-box .icon-container i {
    font-size: 30px;
    color: var(--secondary-color);
}

.benefit-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.benefit-box p {
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.5;
}

/* Media Queries */
@media (max-width: 992px) {
    .carousel-inner .card {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
    
    .benefit-box {
        flex-basis: calc(50% - 10px);
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .carousel-inner {
        gap: 0;
        transition: transform 0.3s linear;
    }
    
    .carousel-inner .card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
        transition: none;
    }
    
    .carousel-inner .card:hover {
        transform: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    #roleplay-carousel-container {
        padding: 0;
    }
    
    .carousel-wrapper {
        padding: 10px 0;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .carousel-control {
        width: 32px;
        height: 32px;
        margin: 0 5px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        opacity: 0.8;
        background-color: rgba(46, 60, 139, 0.9);
        transition: opacity 0.2s linear;
    }

    .carousel-control:hover {
        transform: translateY(-50%);
        opacity: 1;
        background-color: var(--primary-color);
    }

    .carousel-control.prev-btn {
        left: 10px;
    }

    .carousel-control.next-btn {
        right: 10px;
    }
    
    .carousel-indicators {
        margin-top: 15px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .footer-main {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .footer-section {
        min-width: 100%;
    }
    
    .footer-feedback {
        min-width: 100%;
    }
    
    .footer-section a {
        justify-content: center;
    }
    
    .contact-email {
        justify-content: center;
    }
    
    .legal-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .benefit-box {
        flex-basis: 100%;
    }
    
    .card-footer {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .card-footer .btn-start-roleplay {
        flex-basis: 100%;
        order: 2;
        margin-top: 10px;
        text-align: center;
    }
    
    .card-footer .btn-icon-only,
    .card-footer .card-meta {
        order: 1;
    }

    .card-controls {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section {
        font-size: 0.85rem;
    }
    
    .feedback-message {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
} 