@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

/* VFP Design System & Modernization */
:root {
    /* Paleta Oficial VFPMéxico */
    --vfp-bdazzled: #34547B;
    --vfp-munsell: #4688A4;
    --vfp-middle: #70C4D7;
    --vfp-orange: #F4C970;
    --vfp-quin: #832B4E;
    
    /* Variables de UI */
    --vfp-max: #6DB2C6;
    --vfp-grayblue: #6C698D;
    --vfp-cafe: #B37D60;
    
    /* Authentic Glassmorphism base */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --primary: var(--vfp-bdazzled);
    --primary-hover: var(--vfp-munsell);
    --secondary: var(--vfp-middle);
    --text-main: #334155;
    --text-heading: var(--vfp-bdazzled);
    --background: #F8FAFC;
}

/* TIPOGRAFÍA GLOBAL VFP */
body { 
    font-family: 'Rubik', sans-serif; 
    font-weight: 300; /* Rubik Light */
    letter-spacing: -0.01em; /* Relajado de -0.055em para mejor legibilidad web */
    line-height: 1.5; /* Aumentado de 1.4 para que respire más */
    background-color: var(--background); 
    color: var(--text-main); 
    -webkit-font-smoothing: antialiased; 
}

h1, h2, h3, h4, h5, h6, .title-bold {
    font-family: 'Rubik', sans-serif;
    font-weight: 600; /* Reducido de 700 a 600 para que no sea tan pesado */
    letter-spacing: -0.02em; /* Relajado de -0.063em */
    line-height: 1.2; /* Aumentado de 1.11 para separar las líneas de los títulos */
    color: var(--text-heading);
}

/* Ensure headings inside text-white containers or with text-white class are actually white */
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white {
    color: #ffffff !important;
}

.subheading, .font-medium {
    font-weight: 500; /* Rubik Medium */
    letter-spacing: -0.01em;
    line-height: 1.5;
}

/* INPUTS MODERNOS - CLEANER */
.input-modern { 
    width: 100%; 
    padding: 0.75rem 1rem; 
    border: 1px solid transparent; 
    background-color: #f1f5f9; 
    border-radius: 0.75rem; 
    color: var(--text-main); 
    font-size: 0.95rem; 
    transition: all 0.2s ease; 
}
.input-modern:focus { 
    outline: none; 
    background-color: #ffffff; 
    border-color: var(--vfp-middle); 
    box-shadow: 0 0 0 3px rgba(112, 196, 215, 0.15); 
}
.input-modern:disabled { background-color: #F3F4F6; color: #9CA3AF; cursor: not-allowed; }
.input-modern::placeholder { color: #94A3B8; }

/* BOTONES - PILL SHAPED */
.btn-primary { 
    background: linear-gradient(135deg, var(--vfp-bdazzled), var(--vfp-munsell)); 
    color: white; 
    transition: all 0.2s ease; 
    border: none; 
    cursor: pointer; 
    box-shadow: 0 4px 12px rgba(52, 84, 123, 0.25); 
}
.btn-primary:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 6px 16px rgba(52, 84, 123, 0.35); 
    filter: brightness(1.1);
}
.btn-primary:active { transform: scale(0.95); }

/* FLOATING LABELS */
.relative-label-container { position: relative; width: 100%; margin-bottom: 1.5rem; }
.floating-input {
    width: 100%;
    padding: 1.25rem 1rem 0.5rem 1rem;
    font-size: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.2s;
}
.floating-input:focus {
    background-color: #ffffff;
    border-color: var(--vfp-munsell);
    box-shadow: 0 0 0 3px rgba(0, 150, 169, 0.1);
    outline: none;
}
.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: var(--vfp-munsell);
    font-weight: 600;
}
/* CARDS */
.card-modern {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}
.card-modern:hover {
    box-shadow: 0 10px 15px -3px rgba(52, 84, 123, 0.08), 0 4px 6px -2px rgba(52, 84, 123, 0.04);
}

/* GRADIENTS VFP */
.bg-gradient-vfp { background: linear-gradient(135deg, var(--vfp-bdazzled), var(--vfp-munsell)); }
.bg-gradient-vfp-gold { background: linear-gradient(135deg, var(--vfp-orange), #E5A835); }
.bg-gradient-vfp-accent { background: linear-gradient(135deg, var(--vfp-middle), var(--vfp-munsell)); }
.bg-gradient-vfp-quin { background: linear-gradient(135deg, var(--vfp-quin), #5a1d35); }

/* TABS ESTILO PILL / SIDEBAR ITEM */
.tab-btn { padding: 0.5rem 1.25rem; border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500; color: var(--vfp-grayblue); transition: all 0.2s ease; background: transparent; border: none; cursor: pointer; flex-shrink: 0; white-space: nowrap; scroll-snap-align: start; }
.tab-btn:hover { color: var(--vfp-bdazzled); background-color: rgba(52, 84, 123, 0.05); }
.tab-btn.active { background-color: rgba(52, 84, 123, 0.1); color: var(--vfp-bdazzled); font-weight: 600; border-right: 3px solid var(--vfp-bdazzled); border-radius: 0.75rem 0 0 0.75rem; }

/* En móvil, queremos que el active state sea diferente (sin el border-right) */
@media (max-width: 1024px) {
    .tab-btn.active { border-right: none; border-bottom: 3px solid var(--vfp-bdazzled); border-radius: 0.75rem; }
}

/* UTILIDADES EXTRAS */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 20px); }

/* HERO BANNERS */
.hero-banner {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-radius: 24px;
    color: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-banner h3, .hero-banner p {
    color: #ffffff !important;
}
.hero-banner::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.hero-banner-icon {
    position: absolute;
    right: -10%;
    bottom: -20%;
    font-size: 12rem;
    opacity: 0.1;
    transform: rotate(-15deg);
    pointer-events: none;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 1024px) { 
    .group .button-group { opacity: 1 !important; } 
    .hero-banner { padding: 1.5rem; }
    .hero-banner-icon { right: -20%; font-size: 8rem; }
}

/* UTILS */
.text-vfp-primary { color: var(--vfp-bdazzled); }
.text-vfp-secondary { color: var(--vfp-middle); }
.text-vfp-danger { color: var(--vfp-quin); }
.bg-vfp-light { background-color: rgba(112, 196, 215, 0.1); }

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--vfp-munsell); }

/* ANIMACIONES */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-down { animation: slideDown 0.3s ease-out forwards; }

/* Details/Summary Styles */
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }

/* Availability Grid */
.availability-cell { width: 28px; height: 24px; border: 1px solid #e2e8f0; background-color: #fff; margin: 1px; cursor: pointer; transition: background-color 0.2s; border-radius: 4px; }
.availability-cell:hover { background-color: #f1f5f9; }
.availability-cell.selected { background-color: var(--vfp-middle); border-color: var(--vfp-munsell); }
.availability-cell.disabled { background-color: #f8fafc; cursor: not-allowed; opacity: 0.5; }

/* Academic Plan */
.academic-plan-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.academic-step { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.75rem; text-align: center; position: relative; min-width: 140px; }
.academic-step.current { border-color: var(--vfp-munsell); box-shadow: 0 4px 6px -1px rgba(112, 196, 215, 0.3); background-color: #f0f9ff; }
.academic-step.completed { background-color: #f0fdf4; border-color: #bbf7d0; }
.academic-step-header { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--vfp-grayblue); }