@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #087021;
    --primary-dark: #065a1a;
    --secondary: #64748b;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --bg-color: #f1f5f9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --rainbow-gradient: linear-gradient(135deg, #f87171 0%, #4ade80 50%, #60a5fa 100%);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --premium-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.85);
}

/* --- RESET & BASE --- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- HEADER & NAV --- */

.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-nav {
    background: var(--dark);
    color: white;
    padding: 0.5rem 8%;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.admin-nav a:hover {
    color: #4ade80;
}

header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 8%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rainbow-gradient);
    opacity: 0.8;
    z-index: 1;
}

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a:hover::after {
    width: 100%;
}

/* --- DESPLEGABLE DEL HEADER --- */

.dropdownCentro {
    position: relative;
}

.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 0.75rem;
    min-width: 240px;
    box-shadow: var(--premium-shadow);
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    z-index: 100;
}

.dropdownCentro:hover .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu li a {
    padding: 0.8rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    width: 100%;
    display: block;
}

.submenu li a:hover {
    background: #f1f5f9;
    color: var(--primary);
}

/* --- SECCION HERO  --- */

.hero {
    width: 100%;
    min-height: 85vh;
    background: var(--dark);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.6)),
        url('imagenes/imagenPrincipal.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 6rem 5%;
    position: relative;
    gap: 4rem;
}

.hero-grid-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
}

.welcome-text-hero {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    box-shadow: var(--premium-shadow);
    animation: fadeInUp 0.8s ease-out;
}

.welcome-text-hero h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.75rem;
}

.welcome-text-hero h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.welcome-text-hero p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.welcome-text-hero p:last-child {
    margin-bottom: 0;
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.9s ease-out;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #94a3b8;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
    font-weight: 300;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.quick-access-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.quick-card-hero {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.quick-card-hero:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.quick-card-hero i {
    font-size: 1.3rem;
    color: var(--white);
    background: var(--primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition);
    flex-shrink: 0;
}

.quick-card-hero:hover i {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-dark);
}

.quick-card-hero span {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

@media (max-width: 1100px) {
    .hero-grid-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 600px;
    }
    
    .quick-card-hero:hover {
        transform: translateY(-5px);
    }
}

/* --- SECCION DE BIENVENIDA --- */

.welcome-management {
    padding: 10rem 8% 12rem;
    background: white;
    position: relative;
    overflow: hidden;
}

.welcome-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: center;
}

.welcome-image {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--premium-shadow);
    aspect-ratio: 4 / 3;
}

.welcome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.welcome-image:hover img {
    transform: scale(1.05);
}

.welcome-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2.5rem;
    line-height: 1.1;
    position: relative;
    padding-bottom: 1.5rem;
}

.welcome-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
}

.welcome-text p {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

@media (max-width: 1024px) {
    .welcome-container {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .welcome-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .welcome-management {
        padding: 6rem 8% 8rem;
    }
}

/* --- HEADER  --- */

.page-header {
    width: 100%;
    background: var(--dark);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)),
        url('imagenes/imagenPrincipal.png');
    background-size: cover;
    background-position: center;
    padding: 6rem 8%;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rainbow-gradient);
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.page-header p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
    font-weight: 300;
}

/* --- ACCESO RAPIDO --- */

.quick-access-section {
    width: 90%;
    max-width: 1200px;
    margin: -80px auto 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.quick-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 3rem 2rem;
    border-radius: 32px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--premium-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.quick-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.quick-card i {
    font-size: 2.5rem;
    color: var(--primary);
    background: #e8f5e9;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    transition: var(--transition);
}

.quick-card:hover i {
    background: var(--primary);
    color: white;
    transform: rotate(5deg) scale(1.1);
}

.quick-card span {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

/* --- BARRA DEL HEADER --- */

.titulo {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 6rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    border-left: 8px solid var(--primary);
    padding-left: 2rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
}

@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-left: 1.5rem;
        margin-bottom: 3rem;
    }

    .news-grid-home,
    .tablon-info {
        gap: 2rem;
    }
}

/* --- CARDS DEL INICIO Y TABLON --- */

.news-grid-home,
.tablon-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.news-card-home,
.news-card {
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.news-card-home:hover,
.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--premium-shadow);
}

.news-thumb,
.news-image-container {
    height: 240px;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
}

.news-thumb img,
.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-card-home:hover img,
.news-card:hover img {
    transform: scale(1.1);
}

.news-content-home,
.news-card-body {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .news-content-home,
    .news-card-body {
        padding: 1.5rem;
    }

    .news-content-home h3,
    .news-card-body h3 {
        font-size: 1.4rem;
    }
}

.news-date,
.news-meta {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.news-content-home h3,
.news-card-body h3 {
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.news-card:hover .read-more {
    gap: 0.8rem;
    color: var(--primary-dark);
}

.btn-view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-view-all:hover {
    color: var(--primary-dark);
    gap: 0.8rem;
}

/* --- BOTONES Y FORMULARIOS --- */

.create-news-btn,
.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px -5px rgba(8, 112, 33, 0.3);
}

.create-news-btn:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(8, 112, 33, 0.5);
    background: var(--primary-dark);
}

.btn-cancel {
    background: #64748b !important;
    box-shadow: 0 10px 20px -5px rgba(100, 116, 139, 0.3) !important;
}

.btn-cancel:hover {
    background: #475569 !important;
    box-shadow: 0 15px 30px -5px rgba(100, 116, 139, 0.5) !important;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .create-news-btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .form-actions .btn-submit {
        width: 100%;
        padding: 1rem;
    }
}

.form-container {
    display: none;
    background: white;
    padding: 4rem;
    border-radius: 32px;
    margin: 2rem 0 4rem;
    box-shadow: var(--premium-shadow);
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .form-container {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }
}

.form-container.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #f8fafc;
    outline: none;
}

.btn-delete {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #ef4444;
    background: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    z-index: 10;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

@media (max-width: 640px) {
    .btn-delete {
        width: 40px;
        height: 40px;
        top: 1rem;
        right: 1rem;
    }
}

.btn-delete:hover i {
    animation: trash-shake 0.4s ease infinite;
}

@keyframes trash-shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

/* --- FOOTER --- */

footer {
    background: var(--dark);
    color: white;
    padding: 5rem 8%;
    margin-top: 8rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rainbow-gradient);
    opacity: 0.8;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-column h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-column.info p {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cbd5e1;
    font-size: 1rem;
}

.footer-column.info i {
    color: var(--primary);
    width: 20px;
    font-size: 1.1rem;
}

.footer-column.map iframe {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column.map iframe:hover {
    transform: scale(1.02);
}

.social-links {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    width: fit-content;
}

.social-links a:hover {
    background: #087021;
    color: white;
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: auto;
}

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-column.map {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-column.map {
        grid-column: span 1;
    }

    footer {
        padding: 4rem 5%;
    }
}

/* --- UTILIDADES Y MEDIAS --- */

.cuerpoBloque {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    backdrop-filter: blur(10px);
    padding: 4rem;
    border-radius: 40px;
    box-shadow: var(--premium-shadow);
    width: 100%;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 1s ease-out;
}

@media (max-width: 768px) {
    .cuerpoBloque {
        padding: 2rem;
    }
}

.titulo h1 {
    display: none;
}

hr {
    border: 0;
    height: 4px;
    background: var(--rainbow-gradient);
    width: 100px;
    margin: 2rem 0;
    border-radius: 10px;
    opacity: 0.5;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    header {
        padding: 1rem 4%;
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .quick-access-section {
        margin-top: -40px;
    }
}

/* --- GRID --- */

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.section-title-centered {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title-centered::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
}

.oferta-grid-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.oferta-card-visual {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.oferta-card-visual:hover {
    transform: translateY(-12px);
    box-shadow: var(--premium-shadow);
    border-color: var(--primary);
}

.card-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-image i {
    font-size: 5rem;
    color: var(--primary);
    transition: var(--transition);
    z-index: 2;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 1;
}

.oferta-card-visual:hover .card-image {
    background: var(--primary);
}

.oferta-card-visual:hover .card-image i {
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.oferta-card-visual:hover .card-image::before {
    transform: translateY(0);
}

.card-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-content h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.card-content p {
    font-size: 1.05rem;
    color: var(--secondary);
    line-height: 1.6;
}

.dept-card,
.oferta-card {
    background: #f8fafc;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.dept-card:hover,
.oferta-card:hover {
    background: white;
    transform: translateY(-8px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.dept-card i,
.oferta-card i {
    font-size: 2rem;
    color: var(--primary);
    background: white;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dept-card strong {
    font-size: 1.1rem;
    font-weight: 700;
}

.card-full-width {
    grid-column: 1 / -1;
}

.names-list-horizontal {
    display: flex;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    flex-wrap: wrap;
}

.names-list-horizontal p {
    margin: 0;
    position: relative;
}

.names-list-horizontal p:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 15px;
    background: #e2e8f0;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info p {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

/* --- LISTA --- */

.lista-columnas {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.flex-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.flex-list-item:hover {
    background: white;
    transform: translateX(8px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.flex-list-item i {
    color: var(--primary);
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

.flex-list-item span {
    font-weight: 500;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .lista-columnas {
        grid-template-columns: 1fr;
    }
}

/* --- NOTICIAS --- */

.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2.5rem;
    transition: var(--transition);
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
}

.back-btn:hover {
    color: var(--primary);
    background: #e8f5e9;
    transform: translateX(-5px);
}

.detail-media {
    margin-bottom: 3rem;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--premium-shadow);
    background: var(--dark);
    line-height: 0;
}

.premium-img,
.premium-video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.detail-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-wrap;
}

.detail-text::first-letter {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    float: left;
    margin-right: 0.75rem;
    line-height: 1;
}

/* --- BLOG --- */

.blog-placeholder-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.blog-link-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 32px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
}

.blog-link-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--premium-shadow);
    border-color: var(--primary);
}

.blog-link-card i {
    font-size: 2.5rem;
    color: var(--primary);
    background: #e8f5e9;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    flex-shrink: 0;
}

.blog-link-card:hover i {
    background: var(--primary);
    color: white;
}

.blog-link-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-link-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.blog-link-description {
    font-size: 1rem;
    color: var(--text-muted);
}

.intro-text-center {
    font-size: 1.25rem;
    color: var(--text-dark);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* --- CONTACTO --- */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}



.contact-card {
    background: #f8fafc;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.contact-card:hover {
    background: white;
    transform: translateY(-10px);
    box-shadow: var(--premium-shadow);
    border-color: var(--primary);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary);
    background: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.contact-card:hover i {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.card-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-detail strong {
    font-size: 1.25rem;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.card-detail span {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- LAYOUT DE PROYECTOS --- */

.projects-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.project-card-large {
    background: white;
    border-radius: 40px;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.project-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.project-card-large:hover {
    transform: translateY(-15px);
    box-shadow: var(--premium-shadow);
    border-color: var(--primary);
}

.project-card-large:hover::before {
    opacity: 1;
}

.project-card-large .card-icon {
    font-size: 3.5rem;
    color: var(--primary);
    background: #e8f5e9;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    margin-bottom: 2.5rem;
    transition: var(--transition);
    overflow: hidden;
}

.bg-white {
    background: white !important;
}

.project-card-large .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card-large:hover .card-icon img {
    transform: scale(1.1);
}


.project-card-large:hover .card-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.project-card-large h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

.project-items-list {
    list-style: none;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.project-item i {
    color: var(--primary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.project-card-large p {
    font-size: 1.15rem;
    color: var(--secondary);
    line-height: 1.7;
    margin-top: 0.5rem;
}

@media (max-width: 1100px) {
    .projects-grid-large {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

/* --- GALERÍA DE NOTICIAS --- */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-gallery .detail-media {
    margin-bottom: 0;
    height: 100%;
}

.news-gallery .premium-img, 
.news-gallery .premium-video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.news-gallery .premium-img:hover {
    transform: scale(1.02);
    box-shadow: var(--premium-shadow);
}