/* ==================== FHINIX - Custom Theme (Bootstrap 5 Dark) ==================== */

/* ---------- CSS Variables ---------- */
:root {
    --fh-primary: #ff4757;
    --fh-dark: #0f0f0f;
    --fh-card: #1c1c1e;
    --fh-hover: #2c2c2e;
}

/* ---------- Global ---------- */
body {
    background-color: #ffffff !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fw-black { font-weight: 900 !important; }
.letter-spacing { letter-spacing: 3px; }
.letter-spacing-sm { letter-spacing: 1px; }

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(15, 15, 15, 0.98) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--fh-primary) !important;
}

.navbar .dropdown-menu {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    padding: 8px 0;
}

.navbar .dropdown-item:hover {
    background: var(--fh-hover);
    color: var(--fh-primary);
}

/* Botón de Contacto Estilo Especial */
.btn-contacto {
    display: inline-flex;
    align-items: center;
    background: #dc3545;
    color: white;
    padding: 8px 14px 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.67rem;
    transition: all 0.3s ease;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-contacto:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    color: white;
}

.btn-contacto-text {
    line-height: 1;
}

.btn-contacto-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: white;
    border-radius: 50%;
    color: #dc3545;
    font-size: 0.77rem;
    transition: all 0.3s ease;
}

.btn-contacto:hover .btn-contacto-icon {
    transform: translateX(3px);
}

/* Menú desplegable mejorado */
.navbar .dropdown-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
}

.navbar .dropdown-menu {
    min-width: 250px;
    max-height: 80vh;
    overflow-y: auto;
}

.navbar .dropdown-divider {
    margin: 0.25rem 0;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive para botón de contacto */
@media (max-width: 991px) {
    .btn-contacto {
        margin-top: 10px;
        margin-bottom: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .navbar-nav {
        align-items: stretch;
    }
}

@media (min-width: 992px) {
    .navbar-nav {
        align-items: center;
    }
}

/* ---------- Alert Banner ---------- */
.alert-banner {
    font-family: system-ui, -apple-system, sans-serif;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
}

.alert-banner .container {
    max-width: 1200px;
}

.alert-banner strong {
    font-weight: 700;
}

.alert-banner .btn-close-white:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* ---------- Carousel ---------- */
.carousel-section {
    /* Container for carousel */
}

.carousel-section .carousel {
    background-color: #000;
    aspect-ratio: 1210 / 423;
    width: 100%;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: var(--fh-primary);
    width: 30px;
    border-radius: 1rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 30px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    opacity: 0.5;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 14px;
    height: 14px;
}

/* ---------- Hero ---------- */
.hero-section {
    min-height: 500px;
}

.hero-img {
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    filter: brightness(0.5);
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

/* ---------- Event Cards ---------- */
.event-card {
    background: var(--fh-card) !important;
    border-radius: 1rem !important;
    transition: all 0.4s ease;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 71, 87, 0.3) !important;
}

.event-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

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

/* ---------- Training Links ---------- */
.training-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.training-link:hover {
    color: #ffffff !important;
    padding-left: 8px !important;
}

.training-link:hover .bi-arrow-right {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

/* ---------- Sponsors Section ---------- */
.sponsors-section {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.sponsor-item:hover {
    opacity: 1;
}

.sponsor-logo {
    height: 65px;
    max-width: 234px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.sponsor-item:hover .sponsor-logo {
    filter: grayscale(0%);
}

.sponsor-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
    letter-spacing: 2px;
}

/* ---------- Footer ---------- */
.footer-main {
    background: var(--fh-card);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--fh-primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ---------- Login Page ---------- */
.login-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 59, 63, 0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: pulse 4s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 59, 63, 0.08) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-card {
    background: rgba(28, 28, 30, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 1.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6) !important;
    position: relative;
    z-index: 1;
}

/* ---------- Admin Page ---------- */
.admin-page {
    background: var(--fh-dark);
    min-height: 100vh;
}

.admin-page .card {
    background: var(--fh-card) !important;
    border-radius: 1rem !important;
}

/* ---------- Upload Area ---------- */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover {
    border-color: var(--fh-primary);
    background: rgba(255, 71, 87, 0.05);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ---------- Bootstrap Overrides for Dark Admin Forms ---------- */
.admin-page .form-control {
    background: var(--fh-dark);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-page .form-control:focus {
    border-color: var(--fh-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 71, 87, 0.15);
    background: rgba(255, 71, 87, 0.03);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .carousel-hero-section .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .carousel-hero-section .container {
        padding-left: 0;
        padding-right: 0;
    }

    .carousel-section .carousel {
        aspect-ratio: auto;
    }

    .carousel-img {
        width: 100% !important;
        height: auto;
        object-fit: cover;
        aspect-ratio: 1/1;
    }

    .hero-section,
    .hero-img {
        min-height: 350px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 24px;
        height: 24px;
        margin: 0 4px;
    }

    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
    }

    .carousel-indicators .active {
        width: 24px;
    }
}

/* ---------- Newsletter Form ---------- */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background-color: #1a1a1a !important;
    border-color: var(--fh-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 71, 87, 0.25) !important;
    color: #fff !important;
}

.contact-form-footer-svg {
    position: relative;
}

/* ---------- Event Detail Page ---------- */
.event-header-img {
    object-fit: cover;
    width: 100%;
    max-height: 420px;
}

.event-convocatoria-content h3,
.event-convocatoria-content h4 {
    color: var(--fh-primary);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.event-convocatoria-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.event-convocatoria-content ul,
.event-convocatoria-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.event-convocatoria-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.event-convocatoria-content strong {
    color: var(--fh-primary);
}

#eventTabs .nav-link {
    background-color: var(--fh-card);
    color: #aaa;
    border: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

#eventTabs .nav-link:hover {
    color: white;
    background-color: var(--fh-hover);
}

#eventTabs .nav-link.active {
    background: linear-gradient(135deg, var(--fh-primary), #ff6b6b);
    color: white;
    border-color: var(--fh-primary);
}

@media (max-width: 767px) {
    .event-header-img {
        max-height: 300px;
    }

    #eventTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #eventTabs::-webkit-scrollbar {
        display: none;
    }

    #eventTabs .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ---------- RSS Feed Widget ---------- */
.rss-section {
    position: relative;
    padding: 0 !important;
}

.rss-section-background {
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('img/download-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-radius: 50px;
    margin: 0 20px;
    padding: 80px 0;
}

.rssSwiper {
    padding: 20px 50px 60px 50px;
}

.rssSwiper .swiper-button-next,
.rssSwiper .swiper-button-prev {
    color: #ffffff;
    background: var(--fh-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.5);
    transition: all 0.3s ease;
}

.rssSwiper .swiper-button-next:hover,
.rssSwiper .swiper-button-prev:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.7);
}

.rssSwiper .swiper-button-next:after,
.rssSwiper .swiper-button-prev:after {
    font-size: 22px;
    font-weight: bold;
}

.rssSwiper .swiper-pagination-bullet {
    background: var(--fh-primary);
    opacity: 0.5;
}

.rssSwiper .swiper-pagination-bullet-active {
    opacity: 1;
}

#rssFeedContainer .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 380px !important;
}

#rssFeedContainer .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
}

#rssFeedContainer .card-img-top {
    transition: transform 0.3s ease;
    height: 170px !important;
    object-fit: cover;
    flex-shrink: 0;
}

#rssFeedContainer .card:hover .card-img-top {
    transform: scale(1.05);
}

#rssFeedContainer .card-body {
    height: 210px !important;
    display: flex;
    flex-direction: column;
}

#rssFeedContainer .card-title,
.rss-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.05rem;
    line-height: 1.4;
    height: 4.2em;
    margin-bottom: 0.5rem !important;
}

#rssFeedContainer .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#rssFeedContainer .btn-outline-light:hover {
    background-color: var(--fh-primary);
    border-color: var(--fh-primary);
    color: white;
}

@media (max-width: 768px) {
    .rssSwiper {
        padding: 20px 30px 60px 30px;
    }
    
    .rssSwiper .swiper-button-next,
    .rssSwiper .swiper-button-prev {
        width: 45px;
        height: 45px;
    }
    
    .rssSwiper .swiper-button-next:after,
    .rssSwiper .swiper-button-prev:after {
        font-size: 18px;
    }
}

/* ---------- Newsletter Subscription ---------- */
.newsletter-subscription-section {
    background: #f8f9fa;
    min-height: 600px;
    display: flex;
    align-items: stretch;
}

.newsletter-container {
    padding: 0;
    max-width: 100%;
}

.newsletter-form-column {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
}

.newsletter-form-wrapper {
    width: 100%;
    max-width: 500px;
}

.newsletter-image-column {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.newsletter-image {
    width: 100%;
    height: 100%;
    max-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.newsletter-title {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
}

.newsletter-label {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
}

.newsletter-input {
    background: white;
    border: 1px solid #dee2e6;
    color: #1a1a1a;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.newsletter-input::placeholder {
    color: #adb5bd;
}

.newsletter-input:focus {
    background: white;
    border-color: #dc3545;
    color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    outline: none;
}

.newsletter-submit-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.newsletter-submit-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.newsletter-submit-btn:active {
    transform: translateY(0);
}

.newsletter-footer-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0;
    text-align: left;
}

.newsletter-link {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.newsletter-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

@media (max-width: 991px) {
    .newsletter-form-column {
        padding: 3rem 2rem;
    }
    
    .newsletter-image-column {
        min-height: 400px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .newsletter-title {
        font-size: 1.8rem;
    }
    
    .newsletter-form-column {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-image-column {
        min-height: 300px;
        order: -1;
        padding: 1.5rem;
    }
    
    .newsletter-image {
        border-radius: 20px;
    }
    
    .newsletter-submit-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .newsletter-footer-text {
        text-align: center;
    }
}

/* ==================== FAQ CARDS (Contacto Page) ==================== */
.faq-card {
    background: linear-gradient(145deg, #2d2d2d 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.faq-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
}

.faq-question {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.4;
}

.faq-question i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.faq-answer {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 30px;
}

@media (max-width: 991px) {
    .faq-card {
        margin-bottom: 1rem !important;
    }
}
