/* CSS Base - Proyectos Estudiantiles INCB */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #1e3a8a;      /* Azul marino profundo */
    --primary-light: #3b82f6;     /* Azul brillante */
    --secondary-color: #059669;    /* Verde esmeralda */
    --secondary-light: #10b981;    /* Verde brillante */
    --accent-color: #d97706;       /* Dorado/Ambar */
    --accent-light: #f59e0b;       /* Dorado brillante */
    --bg-main: #f8fafc;            /* Gris pizarra muy claro */
    --card-bg: #ffffff;
    --text-primary: #0f172a;       /* Slate 900 */
    --text-secondary: #475569;     /* Slate 600 */
    --text-muted: #94a3b8;         /* Slate 400 */
    --border-color: #e2e8f0;       /* Slate 200 */
    --radius-lg: 1rem;             /* 16px */
    --radius-md: 0.75rem;          /* 12px */
    --radius-sm: 0.5rem;           /* 8px */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e1b4b 50%, #064e3b 100%);
    color: #ffffff;
    padding: 5rem 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
}

/* Buscador & Controles */
.search-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 0.75rem 1rem;
    width: 100%;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

.search-btn {
    background: var(--secondary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--secondary-light);
    transform: translateY(-1px);
}

/* Filter Pills */
.filter-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-pill {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.filter-pill:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.filter-pill.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.filter-pill-secondary {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.filter-pill-secondary:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.filter-pill-secondary.active {
    background-color: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

/* Tarjetas de Proyectos */
.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(30, 58, 138, 0.15);
}

.project-img-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: #e2e8f0;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-badge-materia {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    max-width: calc(100% - 1.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.project-academic-info {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.1rem;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.9rem;
}

.project-meta {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-meta-item strong {
    color: var(--text-primary);
}

.project-card-footer {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.project-btn-detail {
    background-color: var(--bg-main);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    transition: var(--transition);
    display: block;
    text-decoration: none;
}

.project-btn-detail:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* Detalle del Proyecto */
.detail-header-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

.detail-materia {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-left: 3px solid var(--secondary-color);
    padding-left: 0.75rem;
}

.detail-sidebar-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    margin-bottom: 2rem;
    height: sticky;
    top: 5rem;
}

.detail-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Galería & Carrusel */
.gallery-carousel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 16/9;
    background-color: #0f172a;
}

.gallery-carousel-item {
    height: 100%;
}

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

/* Lightbox o Modal de zoom */
.modal-img-zoom {
    max-height: 85vh;
    object-fit: contain;
}

/* Video Wrapper */
.video-wrapper {
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #000000;
}

/* Botones CTA */
.btn-cta-demo {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #047857 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn-cta-demo:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}

/* Responsividad general */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 3.5rem 0 4.5rem 0;
        text-align: center;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .hero-subtitle {
        margin: 0 auto 1.5rem auto;
    }
    .detail-header-card {
        padding: 1.5rem;
    }
    .detail-title {
        font-size: 1.75rem;
    }
}
