/* ============================================
   Estilos para la Escuela de Obstetricia
   Facultad de Ciencias de la Salud - UNSM
   ============================================ */

:root {
    --obst-primary: #8B1538;
    --obst-secondary: #A91D3A;
    --obst-light: #F5E6EA;
    --obst-dark: #6B1029;
    --obst-accent: #C62154;
}

/* Banner Obstetricia */
.obst-banner {
    position: relative;
    background: linear-gradient(135deg, var(--obst-primary) 0%, var(--obst-secondary) 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(139, 21, 56, 0.90) 0%, rgba(169, 29, 58, 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);
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-breadcrumb::before {
    content: '\1F3DB';
    font-size: 1.1rem;
}

/* Responsive Banner */
@media (max-width: 768px) {
    .obst-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.6rem;
    }

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

/* Seccion de Informacion con Tabs */
.info-section {
    background: #f5f5f5;
    padding: 50px 20px;
}

.info-container {
    max-width: 1400px;
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.info-main {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs-wrapper {
    width: 100%;
}

.tabs-buttons {
    display: flex;
    background: var(--obst-primary);
}

.tab-button {
    flex: 1;
    padding: 20px 25px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-bottom-color: #FFD700;
}

.tab-icon-label {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
}

.tab-text-label {
    font-size: 1rem;
    font-weight: 700;
}

.tabs-content {
    padding: 30px;
}

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

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

.tab-content h3 {
    color: var(--obst-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 25px 0 15px 0;
    text-transform: uppercase;
}

.tab-content h3:first-child {
    margin-top: 0;
}

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

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

/* Sidebar de Eventos */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eventos-widget,
.facebook-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.eventos-widget h3,
.facebook-widget h3 {
    background: var(--obst-primary);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.eventos-container {
    padding: 20px;
}

.evento-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.evento-icon {
    color: var(--obst-primary);
    font-size: 0.8rem;
}

.evento-text {
    color: #666;
    font-size: 0.9rem;
}

.no-events {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 15px 0;
}

.eventos-actions {
    margin-top: 15px;
    text-align: center;
}

.btn-eventos {
    color: var(--obst-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-eventos:hover {
    text-decoration: underline;
}

.facebook-widget .fb-page {
    padding: 15px;
}

/* Responsive Info Section */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .eventos-widget,
    .facebook-widget {
        flex: 1;
        min-width: 280px;
    }
}

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

    .tab-button {
        padding: 15px 20px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .tabs-content {
        padding: 20px;
    }

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

    .info-sidebar {
        flex-direction: column;
    }
}

/* Seccion Carrera Profesional */
.carrera-section {
    background: linear-gradient(135deg, var(--obst-dark) 0%, var(--obst-primary) 100%);
    padding: 60px 20px;
}

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

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

.carrera-header h2 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carrera-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 25px;
}

/* Menu lateral izquierdo */
.carrera-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    height: fit-content;
}

.carrera-menu {
    display: flex;
    flex-direction: column;
}

.carrera-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.carrera-menu-item:last-child {
    border-bottom: none;
}

.carrera-menu-item:hover {
    background: var(--obst-light);
    color: var(--obst-primary);
}

.carrera-menu-item.active {
    background: var(--obst-primary);
    color: white;
}

.menu-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.menu-text {
    line-height: 1.3;
}

/* Contenido central de carrera */
.carrera-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 35px;
}

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

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

.carrera-tab-content h3 {
    color: var(--obst-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

.mision-quote,
.vision-quote {
    background: var(--obst-light);
    border-left: 4px solid var(--obst-primary);
    padding: 20px 25px;
    margin: 20px 0;
    font-style: italic;
    color: #444;
    line-height: 1.7;
    border-radius: 0 8px 8px 0;
}

.resolucion-info {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 30px;
    text-align: right;
}

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

.objetivos-list li {
    color: #424242;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.objetivos-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--obst-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Sidebar derecho carrera */
.carrera-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contacto-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 25px;
    text-align: center;
}

.contacto-widget h3 {
    color: var(--obst-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.contacto-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.contacto-icon-link {
    text-decoration: none;
}

.contact-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.contact-circle:hover {
    transform: scale(1.1);
}

.contact-circle.email {
    background: var(--obst-primary);
}

.contact-circle.whatsapp {
    background: #25D366;
}

.facebook-sidebar-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
}

/* Responsive Carrera Section */
@media (max-width: 1200px) {
    .carrera-grid {
        grid-template-columns: 250px 1fr;
    }

    .carrera-right-sidebar {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contacto-widget,
    .facebook-sidebar-widget {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .carrera-header h2 {
        font-size: 1.6rem;
    }

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

    .carrera-sidebar {
        order: 1;
    }

    .carrera-menu {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .carrera-menu-item {
        min-width: 150px;
        flex-direction: column;
        text-align: center;
        padding: 12px 15px;
        border-bottom: none;
        border-right: 1px solid #eee;
    }

    .carrera-menu-item:last-child {
        border-right: none;
    }

    .carrera-content {
        order: 2;
        padding: 25px;
    }

    .carrera-right-sidebar {
        order: 3;
        flex-direction: column;
    }
}

/* Seccion Noticias */
.noticias-section {
    background: #f8f8f8;
    padding: 60px 20px;
}

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

.noticias-container h2 {
    color: var(--obst-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
}

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

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

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

.noticia-image {
    position: relative;
    height: 220px;
    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.05);
}

.noticia-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-overlay {
    transform: translateY(0);
}

.btn-read-more {
    display: inline-block;
    background: var(--obst-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-read-more:hover {
    background: var(--obst-dark);
}

.noticia-content {
    padding: 20px;
}

.noticia-date {
    color: #888;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

.noticia-content h3 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.noticia-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-content h3 a:hover {
    color: var(--obst-primary);
}

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

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

    .noticia-image {
        height: 180px;
    }
}

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

    .main-header,
    .top-header,
    .obst-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;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
