/* ============================================================
   AyN Ingeniería Sustentable - Main Stylesheet
   ============================================================ */

:root {
    --primary: #2C5F6E;
    --secondary: #1a3a45;
    --accent: #4ECDC4;
    --dark: #0d1b20;
    --light: #f8fafb;
    --gray: #6c757d;
    --white: #ffffff;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
    --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    color: #2d3748;
    background: #fff;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
    background: transparent;
    padding: 20px 0;
    transition: var(--transition);
    z-index: 9999;
}

#mainNav.scrolled {
    background: rgba(13, 27, 32, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* Nav Logo Text */
.nav-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: 2px;
    font-family: 'Playfair Display', serif;
    border: 2px solid rgba(255,255,255,0.8);
    padding: 4px 10px;
    display: inline-block;
}

.logo-sub {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
    text-align: center;
    margin-top: 4px;
}

.nav-logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

/* Nav Links */
#mainNav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 18px !important;
    position: relative;
    transition: var(--transition);
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: var(--transition);
    border-radius: 2px;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--accent) !important;
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
    transform: scaleX(1);
}

/* Dropdown */
.dropdown-menu-custom {
    background: rgba(13, 27, 32, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(78,205,196,0.2);
    border-radius: var(--radius);
    padding: 10px 0;
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
}

.dropdown-menu-custom .dropdown-item {
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    padding: 10px 20px;
    transition: var(--transition);
}

.dropdown-menu-custom .dropdown-item:hover {
    background: rgba(78,205,196,0.1);
    color: var(--accent);
    padding-left: 25px;
}

/* Hamburger */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 5px;
}

.hamburger-icon { font-size: 1.7rem; transition: color 0.3s ease; }


.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img,
.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,27,32,0.75) 0%, rgba(44,95,110,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 0 20px;
    animation: heroFadeIn 1.2s ease forwards;
}

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

.hero-title {
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 35px;
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.hero-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
    padding: 13px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44,95,110,0.3);
}

.btn-accent-custom {
    background: var(--accent);
    color: var(--dark);
    border: 2px solid var(--accent);
    padding: 13px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-accent-custom:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78,205,196,0.3);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section-pad { padding: 90px 0; }
.section-pad-sm { padding: 60px 0; }

.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-title-center {
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section { background: #fff; }

.about-text p {
    color: #4a5568;
    line-height: 1.85;
    margin-bottom: 20px;
    font-size: 0.97rem;
}

.about-image-wrap {
    position: relative;
}

.about-image-wrap img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-image-wrap::before {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 60%;
    height: 60%;
    border: 3px solid var(--accent);
    border-radius: 20px;
    z-index: -1;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
    background: #f0f4f7;
}

.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(44,95,110,0.1), rgba(78,205,196,0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-card:hover .service-icon-wrap {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.service-icon-wrap i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon-wrap i { color: white; }

.service-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}

.service-desc {
    color: var(--gray);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ============================================================
   CLIENTS SLIDER
   ============================================================ */
.clients-section { background: #fff; }


.clients-slider-track {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.clients-slider-track.grabbing { cursor: grabbing; }

/* Cada item: JS asigna el ancho */
.cs-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    height: 220px;
}
.cs-item img {
    max-width: 100%;
    max-height: 170px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    pointer-events: none;
    display: block;
}
.cs-item a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
@media (max-width: 767px) {
    .cs-item { height: 200px; padding: 20px; }
    .cs-item img { max-height: 150px; }
}

/* Compatibilidad con página clientes que usa client-logo-wrap */
.client-logo-wrap {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}
.client-logo-wrap img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
    transition: var(--transition);
}
.client-logo-wrap img:hover { opacity: 0.88; transform: scale(1.04); }

.clients-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.clients-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(44,95,110,0.3);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.clients-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* ============================================================
   SCROLL TOP BUTTON
   ============================================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--dark);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(78,205,196,0.4);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(78,205,196,0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 70px 0 30px;
}

.footer-brand .footer-desc {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    margin-top: 15px;
}

.footer-logo-text .logo-main { font-size: 1.4rem; }
.footer-logo-img { height: 50px; }

.footer-heading {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

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

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

.footer-links a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 40px 0 25px;
}

.footer-bottom {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
}

/* ============================================================
   SERVICE PAGE
   ============================================================ */
.service-page-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
}

.service-page-content { padding: 80px 0; }

.service-page-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   NOSOTROS PAGE
   ============================================================ */
.nosotros-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
}

/* ============================================================
   CLIENTES PAGE
   ============================================================ */
.clientes-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
}

.client-grid-item {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.07);
    transition: var(--transition);
}

.client-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.client-grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* Página individual de clientes - slider igual que inicio */
.clients-page-slider {
    padding: 20px 0 40px;
}

.clients-page-slider .clients-slide {
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.clients-page-slider .client-logo-wrap {
    padding: 12px;
    min-width: 200px;
    flex: 1;
}

.clients-page-slider .client-logo-wrap img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    transition: var(--transition);
}

.clients-page-slider .client-logo-wrap img:hover {
    opacity: 0.88;
    transform: scale(1.04);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-sidebar {
    height: 100vh;
    background: var(--dark);
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.admin-nav {
    flex: 1;
}

.admin-brand {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand h5 {
    color: var(--accent);
    font-weight: 700;
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-brand p {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    margin: 4px 0 0;
}

.admin-nav { padding: 15px 0; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-nav-item i { width: 18px; text-align: center; }

.admin-nav-item:hover,
.admin-nav-item.active {
    color: var(--accent);
    background: rgba(78,205,196,0.08);
    border-left-color: var(--accent);
}

.admin-nav-section {
    padding: 15px 20px 5px;
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    font-weight: 700;
}

.admin-main {
    margin-left: 260px;
    min-height: 100vh;
    background: #f0f2f5;
}

.admin-topbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 99;
}

.admin-topbar h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.admin-content { padding: 30px; }

.admin-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.admin-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f4f7;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}

.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover { background: var(--secondary); }

.slide-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.slide-preview {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.client-logo-admin {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
}

.alert-success-custom {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    border-radius: 24px;
    padding: 50px 45px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(13, 27, 32, 0.98);
        border-radius: 12px;
        padding: 15px;
        margin-top: 10px;
    }

    .about-image-wrap::before { display: none; }
    
    .admin-sidebar {
        transform: translateX(-260px);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main { margin-left: 0; }
}

@media (max-width: 576px) {
    .section-pad { padding: 60px 0; }
    .hero-title { font-size: 1.7rem; }
    .service-card { padding: 30px 20px; }
    .login-box { padding: 35px 25px; }
    .admin-content { padding: 20px 15px; }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
    background: linear-gradient(135deg, #f0f4f7 0%, #e8f4f5 100%);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.contact-info-item i {
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-info-item a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-info-item a:hover { color: var(--accent); }

.contact-form-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.contact-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: #2d3748;
    background: #f8fafc;
    transition: var(--transition);
    outline: none;
}

.contact-input:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}

.contact-input::placeholder { color: #a0aec0; }

textarea.contact-input { resize: vertical; }
select.contact-input { cursor: pointer; }

.contact-success {
    text-align: center;
    padding: 40px 20px;
}

.contact-success h4 {
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.contact-success p { color: var(--gray); }

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    z-index: 998;
    text-decoration: none;
    transition: var(--transition);
    animation: waPulse 2.5s infinite;
}

.whatsapp-float:hover {
    background: #1da851;
    color: white;
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(37,211,102,0.6);
    animation: none;
}

@keyframes waPulse {
    0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
    50%      { box-shadow: 0 4px 35px rgba(37,211,102,0.8), 0 0 0 8px rgba(37,211,102,0.1); }
}

@media (max-width: 576px) {
    .contact-form-card { padding: 25px 18px; }
    .whatsapp-float { bottom: 80px; right: 18px; width: 50px; height: 50px; font-size: 1.4rem; }
}

/* ============================================================
   NEWS CARDS
   ============================================================ */
.news-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 3px 20px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-card-img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    height: 210px;
}

.news-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.news-card:hover .news-card-img-wrap img { transform: scale(1.06); }

.news-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44,95,110,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: white;
    font-size: 1.5rem;
}

.news-card:hover .news-card-overlay { opacity: 1; }

.news-card-body {
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .72rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.35;
    flex: 0 0 auto;
}

.news-card-title a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.news-card-title a:hover { color: var(--primary); }

.news-card-excerpt {
    font-size: .88rem;
    color: var(--gray);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    word-break: break-word;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0f4f7;
    padding-top: 14px;
}

.news-read-more {
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.news-read-more:hover { color: var(--accent); }

.news-actions { display: flex; gap: 10px; align-items: center; }

.like-btn, .share-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: var(--gray);
    padding: 5px 8px;
    border-radius: 20px;
    transition: var(--transition);
}

.like-btn:hover  { color: #ef4444; background: #fee2e2; }
.share-btn:hover { color: var(--primary); background: rgba(44,95,110,.08); }

/* ── News Slider (homepage) ───────────────────────────── */
.news-slider-section { background: white; }

.news-slider-wrap { position: relative; }

.news-slider-track {
    display: flex;
    overflow: hidden;
    gap: 0;
}

.news-slider-item {
    min-width: 100%;
    display: none;
    animation: newsSlideIn .4s ease;
}

.news-slider-item.active { display: block; }

@keyframes newsSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.news-slider-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.news-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(44,95,110,.2);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.news-slider-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.news-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.news-slider-nav:hover { background: var(--primary); color: white; border-color: var(--primary); }
.news-slider-prev { left: -20px; }
.news-slider-next { right: -20px; }

@media (max-width: 576px) {
    .news-slider-prev, .news-slider-next { display: none; }
    .news-card-img-wrap { height: 175px; }
}

/* Hero text transition */
.hero-title, .hero-subtitle, .btn-accent-custom {
    transition: opacity 0.3s ease;
}







 

/* ═══════════════════════════════════════════════════════════
   TEXTO JUSTIFICADO — Noticias y contenido editorial
   ═══════════════════════════════════════════════════════════ */

/* Extracto en tarjetas (listado e index) */
.news-card-excerpt {
    text-align: justify !important;
    text-justify: inter-word !important;
    word-break: break-word;
}

/* Noticia individual — resumen (párrafo con borde izquierdo) */
.noticia-resumen {
    text-align: justify !important;
    text-justify: inter-word !important;
}

/* Noticia individual — cuerpo completo */
.noticia-content {
    text-align: justify !important;
    text-justify: inter-word !important;
    word-break: break-word;
}

/* Párrafos, listas y citas dentro del contenido */
.noticia-content p,
.noticia-content li,
.noticia-content blockquote,
.noticia-content span {
    text-align: justify !important;
    text-justify: inter-word !important;
}

/* Títulos: izquierda, nunca justificados */
.noticia-content h1,
.noticia-content h2,
.noticia-content h3,
.noticia-content h4,
.noticia-content h5,
.noticia-content h6 {
    text-align: left !important;
}

/* Mobile: vuelve a izquierda para evitar espacios feos */
@media (max-width: 767px) {
    .news-card-excerpt,
    .noticia-resumen,
    .noticia-content,
    .noticia-content p,
    .noticia-content li,
    .noticia-content span {
        text-align: left !important;
    }
}

/* ============================================================
   BOTONES FLOTANTES PERSONALIZADOS
   ============================================================ */
.floating-btn-custom {
    position: fixed;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    z-index: 997;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.floating-btn-custom:hover {
    color: white;
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    filter: brightness(1.1);
}
@media (max-width: 576px) {
    .floating-btn-custom {
        right: 18px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}
