/* Main Stylesheet for UDES Website */

@import url('contact.css');

:root {
    --primary-color: #000000;
    /* Black - Corporate/Strong */
    --secondary-color: #008f51;
    /* UDES Green (Reference) */
    --accent-color: #008f51;
    /* Using Green as accent too */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --footer-bg: #111111;
    /* Dark footer */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Header & Nav */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Center Trick: Side columns take equal 1fr space */
    align-items: center;
    height: 100px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 60px;
    /* Increased separation between logos and central menu */
}

.logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 20px;
    /* Reduced from 35px to group buttons more tightly */
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 15px;
    /* Slightly increased from 14px */
}

.nav-link:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.logo-aseva-header {
    display: flex;
    justify-content: flex-end;
    /* Align to the right margin */
    align-items: center;
}

.logo-aseva-header img {
    height: 70px;
    /* Standardized with OTEC logo */
    width: auto;
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--white);
    padding: 140px 0;
    /* Increased padding */
    text-align: center;
    overflow: hidden;
}

/* Background & Animation via Pseudo-element */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Black overlay (tenue) + New Image */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/hero_new.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    /* Zoom In Out Effect (4s) */
    animation: zoomHero 8s infinite alternate;
    /* Zoom In then Out continuously */
}

/* Keyframes for simple Zoom In */
/* User asked for "zoom in out al ingresar que dure 4 segundos". 
   If they want a single effect: 'zoomHero 4s ease-out forwards'
   If they want continuous breathing: 'zoomHero 8s infinite alternate' 
   I will use a single smooth zoom in as it's more standard for "entering", 
   but "zoom in out" phrasing is ambiguous. I'll do a slow pulse (4s in, 4s out) 
   to satisfy "in out". */

@keyframes zoomHero {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p.hero-subtitle {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    /* Prevent text wrapping */
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Sections General */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Why UDES */
.why-udes-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    font-size: 18px;
    color: #555;
    margin-bottom: 50px;
}

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

.differential-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.differential-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.differential-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Accredittations */
.accreditations-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: center;
}

/* Accreditations Modern */
.accreditation-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.accreditation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.accreditation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.accreditation-card:hover::before {
    opacity: 1;
}

.badge-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 143, 81, 0.08);
    /* Light Green */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 32px;
    transition: transform 0.3s;
}

.accreditation-card:hover .badge-icon {
    transform: scale(1.1) rotate(10deg);
    background: var(--secondary-color);
    color: white;
}

.accreditation-card h4 {
    color: #333;
    font-weight: 700;
    font-size: 16px;
    margin: 0;
}

/* Modern Hover Effects */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.img-hover-zoom {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.differential-card:hover .img-hover-zoom img {
    transform: scale(1.1);
}

/* Service Crads (Modalidades) */
.service-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-content {
    padding: 25px;
}

/* Footer Update */
footer {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/footer_bg.jpg');
    background-size: cover;
    background-position: center;
    color: #b0b0b0;
    padding: 80px 0 20px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #bbb;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        height: 80px;
        padding: 0 15px;
    }

    .logo {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .logo img {
        height: 40px;
    }

    .logo-aseva-header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .logo-aseva-header img {
        height: 40px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        /* Matches mobile header height */
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
    }

    .nav-menu li a {
        display: block;
        padding: 15px 0;
        width: 100%;
        color: #333;
        /* Dark text for white background */
    }

    .nav-menu li a:hover {
        background-color: #f4f4f4;
        color: var(--secondary-color);
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .cta-group {
        flex-direction: column;
    }

}

/* News Section Redesign Styles (Desktop First) */
.news-container {
    padding: 60px 0;
}

.news-layout-wrapper {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 40px;
}

/* Featured Card with Overlay */
.news-featured-overlay {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 480px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-featured-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-featured-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.featured-text-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 2;
    color: white;
}

.featured-tag {
    background: var(--secondary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
}

.featured-text-content h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    color: white;
}

.featured-meta {
    font-size: 14px;
    opacity: 0.8;
}

/* Sidebar Widgets */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.search-input-group {
    display: flex;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 15px;
}

.search-input-group input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 15px;
}

/* Partner Widget */
.partner-widget {
    background: #1a1a1a;
    color: white;
    text-align: center;
}

.partner-logo-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.partner-logo-box img {
    max-width: 120px;
    height: auto;
}

.partner-widget p {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Latest News Grid */
.news-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card-horizontal {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.card-horizontal:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
    line-height: 1.3;
}

.card-body p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.read-more-link {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
}


/* News Modal (Lightbox) Styles */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-modal.active {
    display: flex;
    opacity: 1;
}

.news-modal-content {
    background: var(--white);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 15px;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.news-modal.active .news-modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-body {
    padding: 40px;
}

.modal-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.modal-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.modal-text {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.modal-text p {
    margin-bottom: 20px;
}

/* Custom Scrollbar for Modal */
.news-modal-content::-webkit-scrollbar {
    width: 8px;
}

.news-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 15px 15px 0;
}

.news-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.news-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .modal-img {
        height: 250px;
    }

    .modal-body {
        padding: 25px;
    }

    .modal-title {
        font-size: 24px;
    }
}

/* Mobile Adjustments for News */
@media (max-width: 992px) {
    .news-layout-wrapper {
        grid-template-columns: 1fr;
    }

    .news-horizontal-grid {
        grid-template-columns: 1fr;
    }

    .news-featured-overlay {
        height: 350px;
    }

    .featured-text-content h2 {
        font-size: 24px;
    }
}