/* ==========================================================================
   VCUATRO - Estilos principales del sitio web
   
   Este archivo contiene todos los estilos personalizados de VCUATRO.
   Organizado por secciones para facilitar la búsqueda y edición.
   
   Secciones incluidas:
   1. Variables y configuración inicial
   2. Navbar y marca (logo + texto)
   3. Botones personalizados
   4. Componentes de la home (hero, frase, cards, libro)
   5. Animaciones
   6. Media queries (responsive)
   7. Páginas interiores
   
   Colores principales de VCUATRO:
   - Amarillo: #f8de4b
   - Negro: #000000
   - Gris oscuro: #1a1a1a
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN INICIAL
   ========================================================================== */
:root {
    /* Colores de la marca VCUATRO */
    --amarillo-vcuatro: #f8de4b;
    --amarillo-hover: #e6b800;
    --negro-vcuatro: #000000;
    --oscuro-vcuatro: #1a1a1a;
    --gris-oscuro: #333333;
    --gris-claro-v4: #f4f6f7;
    --fuente-principal: 'Montserrat', sans-serif;
}

body {
    font-family: var(--fuente-principal);
    color: var(--negro-vcuatro);
    line-height: 1.6;
}

/* Clases de color reutilizables */
.text-primary-v4, .text-amarillo-vcuatro, .text-primary {
    color: var(--amarillo-vcuatro) !important;
}

.text-black {
    color: var(--negro-vcuatro) !important;
}

.bg-light-v4 {
    background-color: var(--gris-claro-v4) !important;
}

.bg-amarillo-vcuatro {
    background-color: var(--amarillo-vcuatro) !important;
}

.bg-oscuro-seccion {
    background-color: #1a1a1a !important;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

/* ==========================================================================
   2. NAVBAR Y MARCA (LOGO + TEXTO)
   ========================================================================== */
/* Logo de VCUATRO en el navbar */
.navbar-logo {
    height: 50px;
    width: auto;
    padding-right: 4px;
}

/* Texto de la marca (VCUATRO + descripción) */
.brand-text {
    border-left: 3px solid var(--amarillo-vcuatro);
    line-height: 1.1;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--negro-vcuatro);
    letter-spacing: 1px;
    display: block;
}

.brand-subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gris-oscuro);
    display: block;
}

/* Links del menú de navegación */
.nav-link {
    font-weight: 600;
    color: var(--negro-vcuatro) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--amarillo-vcuatro) !important;
}

/* Icono de login */
.login-icon-link i {
    transition: color 0.3s ease, transform 0.3s ease;
    vertical-align: middle;
}

.login-icon-link:hover i {
    color: var(--amarillo-vcuatro) !important;
    transform: scale(1.1);
}

/* ==========================================================================
   3. BOTONES PERSONALIZADOS
   ========================================================================== */
/* Botón principal amarillo de VCUATRO */
.btn-primary, .btn-primary-v4 {
    background-color: var(--amarillo-vcuatro) !important;
    border-color: var(--amarillo-vcuatro) !important;
    color: var(--negro-vcuatro) !important;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Al pasar el ratón, el botón se invierte (negro con texto amarillo) */
.btn-primary:hover, .btn-primary-v4:hover {
    background-color: var(--negro-vcuatro) !important;
    border-color: var(--negro-vcuatro) !important;
    color: var(--amarillo-vcuatro) !important;
    transform: translateY(-2px);
}

/* Botón con borde (outline) */
.btn-outline-primary {
    color: var(--negro-vcuatro);
    border-color: var(--amarillo-vcuatro);
    font-weight: bold;
}

.btn-outline-primary:hover {
    background-color: var(--amarillo-vcuatro);
    border-color: var(--amarillo-vcuatro);
    color: var(--negro-vcuatro);
}

/* ==========================================================================
   4. COMPONENTES HOME (HERO, FRASE, CARDS, LIBRO)
   ========================================================================== */

/* Sección Hero (primera sección con imagen de fondo) */
.hero-section {
    position: relative;
    min-height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('../img/aula.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

/* Frase motivacional con fondo negro */
.bg-negro-vcuatro {
    background-color: var(--oscuro-vcuatro);
    border-top: 2px solid var(--amarillo-vcuatro);
    border-bottom: 2px solid var(--amarillo-vcuatro);
}

.frase-motivacional {
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Cards de oposiciones */
.card-oposicion {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: #fff;
}

/* Contenedor de la imagen en la card */
.card-img-container {
    height: 180px;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid var(--amarillo-vcuatro);
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Badge "Destacada" que aparece sobre la imagen */
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--negro-vcuatro);
    color: var(--amarillo-vcuatro);
    padding: 2px 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 1;
}

/* Efecto hover: la card se eleva y la imagen hace zoom */
.card-oposicion:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.card-oposicion:hover .card-img-container img {
    transform: scale(1.1);
}

.card-oposicion:hover .card-title {
    color: var(--amarillo-vcuatro);
}

/* Imagen del libro con efecto flotante */
.img-libro-flotante {
    max-height: 500px;
    transition: all 0.5s ease;
    animation: float 4s ease-in-out infinite;
}

/* Badge que aparece en la esquina del libro */
.badge-libro {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background-color: var(--amarillo-vcuatro);
    color: var(--negro-vcuatro);
    padding: 10px 20px;
    font-weight: 800;
    font-size: 0.8rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: rotate(-5deg);
}

.italic-v4 {
    font-size: 0.95rem;
    line-height: 1.7;
    border-left: 2px solid #eee;
    padding-left: 15px;
}

/* Sección de preparación con fondo oscuro */
.feature-box {
    background-color: #000000 !important;
    border: 1px solid #222;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
    border-color: var(--amarillo-vcuatro);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Iconos circulares amarillos */
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background-color: var(--amarillo-vcuatro);
    color: var(--negro-vcuatro);
    border-radius: 50%;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.feature-box h5 {
    color: #ffffff;
}

.feature-box p {
    color: #b0b0b0 !important;
}

/* Logo y texto de marca en el footer */
.footer-logo {
    height: 45px;
    width: auto;
    padding-right: 4px;
}

.brand-text-footer {
    border-left: 3px solid var(--amarillo-vcuatro);
    line-height: 1.1;
}

.brand-title-footer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    display: block;
}

.brand-subtitle-footer {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--amarillo-vcuatro);
    display: block;
}

/* Enlaces del footer */
.footer-links li a {
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links li a:hover {
    color: var(--amarillo-vcuatro);
    padding-left: 5px;
}

/* ==========================================================================
   BOTÓN WHATSAPP FLOTANTE
   Botón verde que aparece en la esquina inferior derecha
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-decoration: none !important;
    z-index: 2000;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float i {
    font-size: 28px;
    line-height: 1;
}

/* Texto que aparece al pasar el ratón */
.whatsapp-text {
    font-size: 14px;
    font-weight: 700;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s ease;
    opacity: 0;
}

/* Badge de notificación (círculo rojo con número) */
.whatsapp-notify {
    position: absolute;
    top: -5px;
    left: 5px;
    background-color: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}

/* Al pasar el ratón, aparece el texto */
.whatsapp-float:hover .whatsapp-text {
    max-width: 200px;
    margin-left: 10px;
    opacity: 1;
}

/* En móvil, solo se muestra el icono */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
    .whatsapp-text { display: none; }
    .whatsapp-notify { display: none; }
}

/* ==========================================================================
   5. ANIMACIONES
   ========================================================================== */
/* Animación de flotación (se usa en la imagen del libro) */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-fadeIn {
    animation: fadeIn 1.5s ease-in-out forwards;
}

/* Animación de aparición con desvanecimiento */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. MEDIA QUERIES (RESPONSIVE)
   Ajustes para diferentes tamaños de pantalla
   ========================================================================== */
@media (max-width: 768px) {
    .frase-motivacional { font-size: 1.1rem; }
}

@media (max-width: 991px) {
    .navbar-brand { max-width: 75%; }
    .brand-title { font-size: 1.1rem; }
    .brand-subtitle { font-size: 0.55rem; }
    .hero-section { text-align: center; }
    .navbar-nav { padding: 1rem 0; }
    .login-icon-link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.5rem 1rem !important;
    }
}

/* ==========================================================================
   7. PÁGINAS INTERIORES (cabecera, legal, sidebar oposiciones)
   ========================================================================== */
.page-hero {
    border-bottom: 3px solid var(--amarillo-vcuatro);
}

.page-hero .breadcrumb-item a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-hero .breadcrumb-item a:hover {
    color: var(--amarillo-vcuatro) !important;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
    color: #666;
}

/* Páginas legales */
.legal-content h2 {
    border-left: 4px solid var(--amarillo-vcuatro);
    padding-left: 12px;
}

.legal-content a {
    color: var(--negro-vcuatro);
    font-weight: 600;
}

.legal-content a:hover {
    color: var(--amarillo-vcuatro);
}

/* Icono pequeño circular */
.feature-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background-color: var(--amarillo-vcuatro);
    color: var(--negro-vcuatro);
    border-radius: 50%;
    font-size: 1rem;
}

/* Links del sidebar de oposiciones */
.sidebar-opo-link {
    transition: background-color 0.2s ease;
}

.sidebar-opo-link:hover {
    background-color: var(--gris-claro-v4) !important;
}

.sidebar-opo-link:hover span {
    color: var(--amarillo-vcuatro);
}

/* Focus en formularios con color amarillo */
.form-control:focus,
.form-select:focus {
    border-color: var(--amarillo-vcuatro);
    box-shadow: 0 0 0 0.2rem rgba(248, 222, 75, 0.25);
}

.login-icon-link:hover i {
    color: var(--amarillo-vcuatro) !important;
}