/* =========================================
   1. VARIABLES & RESET (TEMA VERDE IJR)
   ========================================= */
:root {
    --color-green: #236c4b;       /* Verde Institucional IJR */
    --color-green-dark: #1a5238;  
    --color-blue: #105ba1;        
    --color-red: #ea4d4d;         
    --color-text: #333;           
    --color-light: #f8f9fa;       
    --font-main: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* =========================================
   2. HEADER & NAVEGACIÓN
   ========================================= */
.ijr-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 50px; width: auto; }
.logo-text h2 { font-size: 1.1rem; color: var(--color-green); font-weight: 700; line-height: 1.2; margin-bottom: 0; }
.logo-text p { font-size: 0.8rem; color: #666; margin: 0; }

.ijr-nav > ul { display: flex; gap: 25px; align-items: center; }
.ijr-nav a { font-weight: 500; font-size: 0.95rem; color: #444; padding: 10px 0; display: block; }
.ijr-nav a:hover, .ijr-nav a.active { color: var(--color-green); }
.btn-nav-action { background: var(--color-green); color: white !important; padding: 8px 20px !important; border-radius: 20px; }

.dropdown { position: relative; cursor: pointer; }
.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    min-width: 200px;
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1100;
    border-top: 3px solid var(--color-green);
}

.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { display: block; padding: 10px 20px; color: #555; font-size: 0.9rem; border-bottom: 1px solid #f9f9f9; }
.dropdown-content a:hover { background: #f9f9f9; color: var(--color-green); }
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--color-green); }

/* =========================================
   3. HERO SLIDER
   ========================================= */
.hero-section { position: relative; height: 85vh; min-height: 500px; background-color: #000; overflow: hidden; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: opacity 1s ease; opacity: 0; z-index: 1; }
.carousel-slide.active { opacity: 1; z-index: 2; }
.hero-overlay { background: rgba(0, 0, 0, 0.45); width: 100%; height: 100%; display: flex; align-items: center; position: relative; z-index: 5; }
.hero-content { color: white; max-width: 800px; position: relative; z-index: 10; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 700; }
.hero-buttons { display: flex; gap: 15px; margin-top: 30px; position: relative; z-index: 20; }
.btn-primary { background: var(--color-green); color: white !important; padding: 12px 30px; border-radius: 5px; font-weight: 600; border: 2px solid var(--color-green); display: inline-block; }
.btn-outline { background: transparent; border: 2px solid white; color: white !important; padding: 12px 30px; border-radius: 5px; font-weight: 600; display: inline-block; }
.btn-primary:hover { background: var(--color-green-dark); transform: translateY(-2px); }
.btn-outline:hover { background: white; color: var(--color-green) !important; }

/* =========================================
   4. ALERTA CABECERA
   ========================================= */
.alert-section { margin: -40px 0 60px 0; position: relative; z-index: 100; }
.admission-promo-card { background: white; border-radius: 15px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); padding: 30px 40px; display: flex; align-items: center; gap: 30px; border-top: 5px solid var(--color-red); }
.promo-icon-box { background: #fdecec; color: var(--color-red); width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; flex-shrink: 0; }
.promo-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; }
.primary-text { font-size: 1rem; color: #444; }
.btn-card-action { background-color: var(--color-red); color: white !important; padding: 10px 20px; border-radius: 50px; font-weight: 600; }

/* =========================================
   5. SECCIÓN TRADICIÓN
   ========================================= */
.tradition-section { background: var(--color-green); color: white; padding: 80px 0; border-radius: 0 0 50px 50px; text-align: center; }
.tradition-header { margin-bottom: 50px; }
.tradition-logo { height: 120px; width: auto; margin-bottom: 20px; }
.tradition-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin: 50px 0; }
.stat-item i { font-size: 2.2rem; background: rgba(255, 255, 255, 0.1); width: 75px; height: 75px; line-height: 75px; border-radius: 50%; display: inline-block; margin-bottom: 20px; }
.stat-item h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.stat-item p { font-size: 0.95rem; opacity: 0.85; }
.tradition-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-top: 40px; }
.tradition-list span { background: rgba(255, 255, 255, 0.15); padding: 10px 25px; border-radius: 30px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }

/* =========================================
   6. SERVICIOS
   ========================================= */
.services-section { padding: 80px 0; background-color: #fff; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; color: var(--color-green); margin-bottom: 10px; font-weight: 700; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.service-card { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s ease; border-top: 5px solid transparent; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.card-icon { font-size: 2.5rem; margin-bottom: 25px; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; }
.service-card p { font-size: 0.95rem; color: #666; margin-bottom: 25px; flex-grow: 1; }
.card-list { margin-bottom: 25px; }
.card-list li { font-size: 0.9rem; color: #555; margin-bottom: 10px; position: relative; padding-left: 20px; text-align: left; }
.card-list li::before { content: "•"; position: absolute; left: 0; color: #ccc; font-weight: bold; }
.btn-card { display: inline-block; padding: 12px; text-align: center; border-radius: 8px; font-weight: 600; font-size: 0.9rem; }
.card-green { border-color: var(--color-green); }
.card-green .card-icon { color: var(--color-green); }
.card-green .btn-card { background: #f0f7f3; color: var(--color-green); }
.card-blue { border-color: var(--color-blue); }
.card-blue .card-icon { color: var(--color-blue); }
.card-blue .btn-card { background: #eef6fc; color: var(--color-blue); }
.card-red { border-color: var(--color-red); }
.card-red .card-icon { color: var(--color-red); }
.card-red .btn-card { background: #fdecec; color: var(--color-red); }

/* =========================================
   7. PROCESO DE ADMISIÓN
   ========================================= */
.admissions-process { background: #f9f9f9; padding: 80px 0; }
.steps-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.step-card { text-align: center; color: white; padding: 40px 20px; border-radius: 12px; transition: transform 0.3s; }
.step-card:hover { transform: scale(1.03); }
.step-green { background-color: #236c4b !important; }
.step-blue { background-color: #105ba1 !important; }
.step-red { background-color: #ea4d4d !important; }
.step-green-dark { background-color: #1a5238 !important; }
.step-icon { font-size: 2.5rem; margin-bottom: 15px; background: rgba(0,0,0,0.1); width: 70px; height: 70px; line-height: 70px; border-radius: 50%; margin: 0 auto 15px; }
.step-card h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.step-card p { font-size: 0.9rem; opacity: 0.9; }
.btn-large { padding: 15px 50px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

/* =========================================
   8. DOCUMENTOS
   ========================================= */
.documents-section { padding: 80px 0; background: white; }
.section-title-left { margin-bottom: 40px; }
.section-title-left h2 { font-size: 2rem; color: var(--color-text); display: flex; align-items: center; gap: 15px; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.doc-card { display: flex; align-items: center; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 20px; gap: 20px; transition: 0.3s; }
.doc-card:hover { border-color: #105ba1; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(16, 91, 161, 0.05); }
.doc-icon { font-size: 2rem; color: #105ba1; width: 50px; text-align: center; }
.doc-info { flex-grow: 1; }
.doc-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 5px; color: #333; }
.doc-date { font-size: 0.8rem; color: #888; }
.badge-new { background: var(--color-red); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 5px; }
.highlight-new { border-left: 5px solid var(--color-red); background: #fffaf0; }

/* =========================================
   9. NOTICIAS, JOURNAL & PERIÓDICO
   ========================================= */
.news-section { padding: 80px 0; }
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.news-card { border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: 0.3s; background: white; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 25px rgba(0,0,0,0.15); }
.news-img { height: 200px; width: 100%; background-color: #eee; background-size: cover; background-position: center; }
.news-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; text-align: left; }
.news-date { font-size: 0.8rem; color: #888; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.news-tag { background: var(--color-blue); color: white; font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.news-content h3 { font-size: 1.15rem; margin-bottom: 10px; line-height: 1.4; color: #333; font-weight: 700; }
.news-content p { font-size: 0.9rem; color: #666; margin-bottom: 20px; flex-grow: 1; }
.btn-news { color: var(--color-green); font-weight: 600; font-size: 0.9rem; }

.journal-full { box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important; border: 1px solid #eee; height: auto !important; }
.journal-text { line-height: 1.6; color: #555; font-size: 1rem; margin-top: 15px; }
.journal-text img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }

.robledista-section { padding: 80px 0; background-color: #f4f6f8; text-align: center; }
.section-header-center { margin-bottom: 50px; }
.newspapers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.paper-card { background: white; border-radius: 15px; overflow: hidden; display: flex; box-shadow: 0 10px 30px rgba(0,0,0,0.05); height: 300px; text-align: left; }
.paper-cover { width: 45%; }
.paper-content { width: 55%; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.btn-paper { align-self: flex-start; border-bottom: 2px solid var(--color-green); font-weight: 700; }

/* =========================================
   10. FOOTER
   ========================================= */
.main-footer { background: #222; color: #eee; padding: 60px 0 30px; }
.footer-info h4 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; }
.footer-info p { margin-bottom: 10px; font-size: 0.9rem; color: #ccc; }
.footer-bottom { text-align: center; border-top: 1px solid #333; padding-top: 30px; margin-top: 40px; font-size: 0.8rem; color: #777; }

.ig-footer-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #ccc;
    display: flex;
    align-items: center; gap: 10px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ig-footer-item:hover { background: #E1306C; color: white; border-color: #E1306C; transform: translateX(-5px); }

/* =========================================
   BARRA LATERAL / INFERIOR FLOTANTE
   ========================================= */
.sidebar-floating {
    position: fixed;
    right: 0; top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end;
}

.side-btn {
    width: 60px; height: 60px;
    display: flex; justify-content: center; align-items: center;
    color: white !important; font-size: 1.5rem;
    transition: all 0.3s ease; text-decoration: none;
    position: relative; overflow: visible;
}

.btn-label {
    position: absolute;
    right: 60px;
    background: white;
    padding: 8px 20px;
    border-radius: 30px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid;
    font-size: 0.9rem;
}

.side-btn:hover .btn-label { opacity: 1; visibility: visible; transform: translateX(-5px); }

.floating-competition {
    position: fixed;
    bottom: 20px; right: 30px; 
    display: flex; align-items: center; gap: 12px; background: white;
    padding: 10px 20px; border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-decoration: none; color: #333; font-weight: 800; z-index: 9998;
    border: 2px solid #f1c40f; transition: 0.3s;
}

.floating-competition:hover { transform: scale(1.05); background: #fdfdfd; }
.trophy-anim { font-size: 1.8rem; color: #f1c40f; animation: cup-wobble 2s infinite ease-in-out; }
@keyframes cup-wobble { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(15deg) scale(1.1); } 50% { transform: rotate(-15deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }

/* =========================================
   RESPONSIVIDAD
   ========================================= */
@media (max-width: 900px) {
    .ijr-header { position: relative; }
    .mobile-toggle { display: block; }
    .ijr-nav > ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; padding: 20px; border-top: 2px solid var(--color-green); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .ijr-nav.open > ul { display: flex; }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown.open .dropdown-content { display: block; position: relative; box-shadow: none; border: none; padding-left: 20px; }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    .alert-section { margin: 20px 0; }
    .admission-promo-card { flex-direction: column; text-align: center; padding: 30px 20px; gap: 20px; }
    .tradition-section { border-radius: 0; }
    .docs-grid { grid-template-columns: 1fr; }
    .paper-card { flex-direction: column; height: auto; }
    .paper-cover, .paper-content { width: 100%; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-social-grid { align-items: center !important; margin-top: 30px; }

    .sidebar-floating {
        top: auto; bottom: 0; right: 0; left: 0;
        width: 100%; height: 60px;
        flex-direction: row; justify-content: center; align-items: flex-end;
        transform: none; background: rgba(0, 0, 0, 0.1); backdrop-filter: blur(5px);
    }
    .side-btn { flex: 1; height: 60px; width: auto; }
    .btn-label { display: none; }
    .floating-competition { bottom: 70px; right: 10px; padding: 8px 15px; font-size: 0.75rem; }

    body { padding-bottom: 60px; }
}