/* ============================================
   Estilos para la Escuela de Ingeniería Ambiental
   ============================================ */

/* Banner Ingeniería Ambiental */
.ambi-banner {
    position: relative;
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    padding: 40px 20px;
    overflow: hidden;
    min-height: 300px;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.90) 0%, rgba(76, 175, 80, 0.85) 100%);
    z-index: 1;
}

.banner-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.banner-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
}

.banner-logo {
    flex-shrink: 0;
}

.banner-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    background: white;
    border-radius: 50%;
    padding: 8px;
}

.banner-title-section h1 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-breadcrumb {
    color: #ffffff;
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive Banner */
@media (max-width: 768px) {
    .ambi-banner {
        min-height: 250px;
        padding: 30px 20px;
    }

    .banner-header {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    .banner-logo img {
        width: 60px;
        height: 60px;
    }

    .banner-title-section h1 {
        font-size: 1.5rem;
    }

    .banner-breadcrumb {
        font-size: 0.9rem;
    }
}

/* Sección de Información con Tabs y Sidebar */
.info-section {
    background: #ffffff;
    padding: 50px 20px;
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .info-container {
        grid-template-columns: 1fr;
    }
}

.tabs-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs-buttons {
    display: flex;
    background: #f5f5f5;
    border-bottom: 3px solid #4CAF50;
}

.tab-button {
    flex: 1;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: #555;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: #E8F5E9;
    color: #4CAF50;
}

.tab-button.active {
    background: #4CAF50;
    color: white;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2E7D32;
}

.tabs-content {
    padding: 30px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.tab-content p {
    color: #424242;
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
    text-align: justify;
}

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

/* Eventos Sidebar */
.eventos-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.eventos-sidebar h3 {
    color: #2E7D32;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.no-eventos {
    text-align: center;
    color: #666;
    padding: 20px 0;
    font-style: italic;
}

.eventos-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-add-evento {
    flex: 1;
    padding: 10px;
    background: transparent;
    color: #2E7D32;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-add-evento:hover {
    background: #E8F5E9;
    border-color: #4CAF50;
}

.btn-calendario {
    flex: 1;
    padding: 10px;
    background: transparent;
    color: #2E7D32;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-calendario:hover {
    background: #E8F5E9;
    border-color: #4CAF50;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .tabs-buttons {
        flex-direction: column;
    }

    .tab-button {
        padding: 15px;
        font-size: 0.95rem;
    }

    .tabs-content {
        padding: 20px;
    }

    .tab-content p {
        font-size: 1rem;
    }
}

/* Sección Carrera Profesional */
.carrera-section {
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    padding: 60px 20px;
}

.carrera-container {
    max-width: 1200px;
    margin: 0 auto;
}

.carrera-header {
    text-align: center;
    margin-bottom: 50px;
}

.carrera-header h2 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.carrera-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
}

/* Grid de Carrera con Sidebar */
.carrera-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
    .carrera-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar de navegación */
.carrera-sidebar {
    background: #f5f5f5;
    padding: 0;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    color: #424242;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-nav a .nav-icon {
    color: #999;
    font-size: 1.1rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #E8F5E9;
    color: #2E7D32;
    border-left-color: #4CAF50;
}

.sidebar-nav a.active {
    background: #4CAF50;
    color: white;
    border-left-color: #2E7D32;
}

.sidebar-nav a.active .nav-icon {
    color: white;
}

/* Contenido de la carrera */
.carrera-content {
    padding: 40px;
}

.carrera-content h3 {
    color: #2E7D32;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carrera-content h3::before {
    content: '';
    width: 5px;
    height: 30px;
    background: #4CAF50;
    border-radius: 3px;
}

.carrera-content p {
    color: #424242;
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
    text-align: justify;
}

.carrera-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.carrera-content ul li {
    color: #424242;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.carrera-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Info Cards dentro del contenido */
.carrera-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #4CAF50;
}

.info-card .info-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.info-card h4 {
    color: #2E7D32;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.info-card p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

/* Responsive Carrera */
@media (max-width: 768px) {
    .carrera-header h2 {
        font-size: 1.8rem;
    }

    .carrera-content {
        padding: 25px;
    }

    .carrera-content h3 {
        font-size: 1.4rem;
    }

    .carrera-info-cards {
        grid-template-columns: 1fr;
    }
}

/* Sección Noticias Recientes */
.noticias-section {
    background: #ffffff;
    padding: 60px 20px;
}

.noticias-container {
    max-width: 1200px;
    margin: 0 auto;
}

.noticias-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.noticias-header::before {
    content: '';
    width: 5px;
    height: 35px;
    background: linear-gradient(180deg, #2E7D32, #4CAF50);
    border-radius: 3px;
}

.noticias-container h2 {
    color: #2E7D32;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.noticia-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.noticia-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.noticia-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.noticia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-image img {
    transform: scale(1.1);
}

.noticia-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #4CAF50;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.noticia-fecha {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.noticia-content {
    padding: 25px;
}

.noticia-content h3 {
    color: #2E7D32;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.noticia-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.noticia-link {
    color: #4CAF50;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.noticia-link:hover {
    color: #2E7D32;
    padding-left: 5px;
}

.no-noticias {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px 20px;
    grid-column: 1 / -1;
    font-style: italic;
}

/* Responsive Noticias */
@media (max-width: 768px) {
    .noticias-container h2 {
        font-size: 1.5rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }
}

/* Ajustes generales para móvil */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        padding: 0;
    }

    .main-header,
    .top-header,
    .ambi-banner,
    .info-section,
    .carrera-section,
    .noticias-section,
    footer {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .banner-content-wrapper,
    .info-container,
    .carrera-container,
    .noticias-container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
    }
}
