/* =====================================================
    ESTILOS DE INICIO - VERSIÓN DEFINITIVA (PC + MÓVIL PERFECCIONADO)
    
    Contiene:
    1. Estilos Globales y Fondo
    2. Hero Section (Ajustado para que no se vea estirado en móvil)
    3. Sección Tesis
    4. FIX TARJETAS MÓVIL (Compactas y elegantes)
=====================================================
*/

/* --- 1. CONFIGURACIÓN DEL FONDO GLOBAL --- */
body {
    background-image: url('../img/3.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #1a1a2a;
    color: #e0e0e0; 
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- SUPERPOSICIÓN DE GRADIENTE --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.3) 0%, rgba(0, 77, 64, 0.1) 50%, rgba(30, 30, 40, 0.4) 100%);
    z-index: 0;
    pointer-events: none;
}

/* --- CONTENEDOR PRINCIPAL --- */
.landing-main { 
    padding: 2.2rem 2rem 3rem; 
    max-width: 1700px; 
    margin: 0 auto; 
    position: relative;
    z-index: 1;
}

/* ==============================================
   2. SECCIÓN HERO (ENCABEZADO PRINCIPAL)
============================================== */

.hero-section-simple {
    padding: 80px 0 80px 0;
    position: relative;
    z-index: 10;
}

/* Contenedor "Vidrio Oscuro" */
.hero-container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.hero-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Badge "Excelencia" */
.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 188, 212, 0.2);
    color: #00bcd4;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem; /* Margen PC */
    border: 1px solid rgba(0, 188, 212, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-badge i { margin-right: 8px; }

/* Títulos */
.hero-title {
    margin-bottom: 2rem; /* Margen PC */
    animation: fadeInUp 1s ease 0.4s both;
}

.titulo-principal {
    display: block;
    font-size: 3.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.titulo-secundario {
    display: block;
    font-size: 2.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.titulo-highlight {
    display: block;
    font-size: 1.6rem;
    font-weight: 500;
    color: #00bcd4;
    margin-top: 1rem;
}

/* Descripción */
.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 2.5rem; /* Margen PC */
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-description strong { color: #00bcd4; font-weight: 700; }

/* Botones */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.btn-hero-principal, .btn-hero-secundario {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
    font-size: 1rem;
    border: 2px solid transparent;
}

.btn-hero-principal {
    background: linear-gradient(135deg, #4caf50, #00bcd4);
    color: white;
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.4);
}

.btn-hero-principal:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.6);
    color: white;
}

.btn-hero-secundario {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-hero-secundario:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    color: white;
}

/* Elementos Visuales (Tarjetas Flotantes PC) */
.hero-visual {
    position: relative;
    height: 600px;
    margin-left: -2rem;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 188, 212, 0.2);
    animation: floatAnimation 6s ease-in-out infinite;
    transition: all 0.3s ease;
    z-index: 15;
}

.floating-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 137, 123, 0.3);
    border-color: rgba(0, 188, 212, 0.4);
}

.floating-card:nth-child(1) { top: 20px; right: -20px; width: 280px; }
.floating-card:nth-child(2) { top: 180px; right: 30px; width: 300px; animation-delay: -2s; }
.floating-card:nth-child(3) { top: 340px; right: -10px; width: 260px; animation-delay: -4s; }

.card-research {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.research-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00897b, #00bcd4);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.research-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 700;
}

.research-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ==============================================
   3. SECCIÓN DE TESIS
============================================== */

.solicitudes-title {
    color: #fff !important;
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 4px 12px rgba(0,0,0,.65);
    padding: 1.75rem 2.5rem;
    border-radius: 16px;
    font-size: 1.85rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
}

.solicitudes-title i { font-size: 1.6rem; opacity: 0.9; }

.solicitudes-title::after {
    content: "";
    width: 150px;
    height: 4px;
    background: #00bcd4;
    margin: 10px auto 0;
    display: block;
    border-radius: 5px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
}

.tesis-destacadas-section {
    padding: 80px 0;
    background: transparent;
}

/* TARJETA TIPO BLANCO (BASE) */
.tesis-card {
    background: #ffffff;
    border: 1px solid #e0f2f1;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 137, 123, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.tesis-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 137, 123, 0.15);
    border-color: rgba(0, 137, 123, 0.2);
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    margin-bottom: 1rem;
    background: transparent;
    padding: 0;
    border: none;
}

.tesis-categoria {
    background: linear-gradient(135deg, #00897b, #00bcd4);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.tesis-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a; 
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.4 * 2em);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-box {
    position: relative;
    border: 2px solid #e0f2f1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f9f8, #ffffff);
    margin: 0.8rem 0;
    box-shadow: 0 2px 8px rgba(0, 137, 123, 0.1);
    height: 160px;
}

.preview-embed {
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
}

.preview-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(0, 137, 123, 0.1));
    pointer-events: none;
}

.tesis-resumen {
    color: #666; 
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.8rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: calc(1.5em * 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 1rem 1.5rem;
    margin-top: auto;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
}

.tesis-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: #666;
}

.tesis-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tesis-meta span i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00897b, #00bcd4);
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-right: 8px;
}

.tesis-acciones {
    text-align: right;
}

.btn-action {
    background: linear-gradient(135deg, #00897b, #00bcd4);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.3);
    color: white;
}

.btn-ver-mas {
    display: inline-block;
    padding: 18px 45px;
    background: linear-gradient(135deg, #00897b 0%, #00bcd4 50%, #4caf50 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(0, 137, 123, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.btn-ver-mas:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 137, 123, 0.6);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-texto {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-efecto {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.btn-ver-mas:hover .btn-efecto {
    left: 100%;
}

.efecto-brillo {
    position: relative;
    overflow: hidden;
}

.efecto-brillo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s ease;
    pointer-events: none;
}

.efecto-brillo:hover::after {
    opacity: 1;
    transform: scale(1);
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

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

/* =================================================================
   MEDIA QUERIES (AJUSTES PARA MÓVIL Y TABLET)
================================================================= */

/* Tablets y menores (max-width: 992px) */
@media (max-width: 992px) {
    .landing-main { padding: 1.8rem 1.4rem 2.4rem; }
    .titulo-principal { font-size: 3rem; }
    .titulo-secundario { font-size: 1.8rem; }
    .titulo-highlight { font-size: 1.4rem; }
    .hero-description { font-size: 1.1rem; }
    .hero-container { padding: 2.5rem 2rem; margin-bottom: 3rem; }
    
    .floating-card {
        position: relative !important;
        width: 100% !important;
        margin-bottom: 1rem;
        top: auto !important;
        right: auto !important;
    }
    .hero-visual {
        height: auto;
        margin-top: 2rem;
        margin-left: 0;
    }
}

/* Teléfonos Grandes (max-width: 768px) */
@media (max-width: 768px) {
    .hero-section-simple { padding: 50px 0; }
    .hero-visual { display: none; }
    .hero-actions { gap: 1rem; }
    .btn-hero-principal, .btn-hero-secundario { width: 100%; justify-content: center; max-width: 300px; }
    .titulo-principal { font-size: 2.5rem; }
    .titulo-secundario { font-size: 1.5rem; }
}

/* =========================================================================
   FIX ESPECÍFICO PARA TELÉFONOS (ARREGLA HERO ESTIRADO Y TARJETAS DOBLES)
   (Pantallas menores a 767px)
========================================================================= */
@media (max-width: 767px) {

    /* --- 1. ARREGLO DEL HERO "ESTIRADO" (COMPACTACIÓN) --- */
    
    .landing-main {
        padding: 1.2rem 1rem 2rem; /* Menos relleno general */
    }

    .hero-section-simple {
        padding: 30px 0; /* Reducir mucho el espacio superior/inferior (antes 80px) */
    }

    .hero-container {
        padding: 1.5rem 1.2rem; /* Contenedor más compacto */
        text-align: left; /* Alineación limpia a la izquierda (o center si prefieres) */
    }

    /* Reducimos los márgenes verticales drásticamente para quitar lo "estirado" */
    .hero-badge {
        margin-bottom: 0.8rem; /* Antes 1.5rem */
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .hero-title {
        margin-bottom: 1rem; /* Antes 2rem */
    }

    /* Ajuste de fuentes para que no se rompan feo en pantallas angostas */
    .titulo-principal {
        font-size: 2rem; /* Más pequeño para que quepa mejor */
        line-height: 1.1; /* Líneas más juntas */
        margin-bottom: 5px;
    }

    .titulo-secundario {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .titulo-highlight {
        font-size: 1.1rem;
        margin-top: 5px;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem; /* Antes 2.5rem */
        line-height: 1.5;
    }

    /* Botones más compactos */
    .hero-actions {
        gap: 10px;
    }

    .btn-hero-principal, .btn-hero-secundario {
        padding: 10px 20px;
        font-size: 0.9rem;
    }


    /* --- 2. FIX TARJETAS DOBLE COLUMNA "AIRY" (TU AJUSTE PREVIO) --- */

    .row.g-3 {
        --bs-gutter-x: 10px; 
        --bs-gutter-y: 15px; 
    }

    .card-content {
        padding: 0.9rem; /* Relleno amplio para que respire */
    }

    .tesis-titulo {
        font-size: 0.85rem;
        line-height: 1.25;
        margin-top: 5px;
        margin-bottom: 8px;
        height: 2.5em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tesis-categoria {
        font-size: 0.65rem;
        padding: 2px 8px;
        border-radius: 4px;
    }

    /* Imagen más alta (tu petición anterior) */
    .preview-box {
        height: 115px;
        margin: 6px 0 10px 0;
        border-radius: 8px;
    }

    .tesis-resumen {
        display: none !important;
    }

    .card-footer {
        padding: 8px;
        background: transparent;
        border-top: 1px solid #f0f0f0;
        margin: 0 -0.9rem -0.9rem -0.9rem;
    }

    .tesis-meta {
        font-size: 0.7rem;
        margin-bottom: 6px;
        flex-direction: column;
        gap: 3px;
        color: #555;
    }

    .tesis-meta span i {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
        margin-right: 5px;
    }

    .tesis-acciones { width: 100%; }

    .btn-action {
        width: 100%;
        justify-content: center;
        padding: 6px 0;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .btn-action span {
        margin-left: 5px;
    }
}