/* Global Styles */
:root {
    --agel-blue: #0d47a1;
    --agel-dark-blue: #002171;
    --agel-light-blue: #5472d3;
    --agel-green: #1b5e20;
    --agel-maroon: #880e4f;
    --agel-gray: #f5f5f5;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
}

/* Header */
.top-header {
    background: linear-gradient(90deg, #1b73f7 0%, #002171 100%);
    color: white;
    padding: 10px 0;
}

.main-header {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--agel-blue);
    margin: 0;
    text-transform: uppercase;
}

.logo-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 1px;
}

/* Navbar */
.navbar-custom {
    background-color: var(--agel-blue);
    padding: 0;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Slider */
.carousel-item {
    height: 500px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    bottom: 50px;
}

/* Shortcuts (Accesos Directos) */
.shortcut-section {
    padding: 40px 0;
    background-color: white;
}

.shortcut-item {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shortcut-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(13, 71, 161, 0.15);
    border-color: var(--agel-light-blue);
}

.shortcut-icon {
    font-size: 2.5rem;
    color: var(--agel-blue);
    margin-bottom: 15px;
}

.shortcut-title {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

/* News Cards */
.news-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.news-img-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img-container img {
    transform: scale(1.1);
}

.news-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--agel-blue);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-body {
    padding: 20px;
}

.news-date {
    color: var(--agel-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.news-title {
    color: var(--agel-dark-blue);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-author {
    color: var(--agel-maroon);
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-style: italic;
}

.news-excerpt {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read-more {
    background-color: var(--agel-blue);
    color: white;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-read-more:hover {
    background-color: var(--agel-dark-blue);
    color: white;
    padding-right: 25px;
}

.btn-read-more i {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
}

.footer a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* Director Card */
.director-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: none;
    text-align: center;
    overflow: visible;
    margin-top: 30px;
}

.director-header-bg {
    background: linear-gradient(90deg, var(--agel-blue) 0%, var(--agel-dark-blue) 100%);
    height: 80px;
    border-radius: 10px 10px 0 0;
}

.director-img-container {
    margin-top: -60px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.director-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.director-name {
    color: var(--agel-blue);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.director-title {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Pagination Modern */
.pagination-modern .page-link {
    border: none;
    margin: 0 5px;
    border-radius: 5px !important;
    color: var(--agel-blue);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pagination-modern .page-item.active .page-link {
    background-color: var(--agel-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(13, 71, 161, 0.3);
}

.pagination-modern .page-link:hover {
    background-color: var(--agel-light-blue);
    color: white;
    transform: translateY(-2px);
}

/* Horizontal News Card (Archive) */
.news-card-horizontal {
    display: flex;
    flex-direction: row;
    height: auto;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.news-card-horizontal:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.1);
}

.news-card-horizontal .news-img-container {
    width: 300px;
    min-width: 300px;
    height: 220px;
}

.news-card-horizontal .news-body {
    padding: 25px;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .news-card-horizontal {
        flex-direction: column;
    }

    .news-card-horizontal .news-img-container {
        width: 100%;
        height: 200px;
    }
}

/* Floating WhatsApp Button Optimized */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-float i {
    font-size: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* Tooltip/Message Bubble */
.whatsapp-float .whatsapp-msg {
    position: absolute;
    right: 80px;
    background: white;
    color: #333;
    padding: 10px 18px;
    border-radius: 20px 20px 5px 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.4s ease;
    pointer-events: none;
    border: 1px solid #efefef;
}

.whatsapp-float:hover .whatsapp-msg {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Pulse animation refined */
.whatsapp-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.5;
    z-index: -1;
    animation: whatsapp-ping 2s infinite, whatsapp-shake 5s infinite;
}

@keyframes whatsapp-shake {

    0%,
    100% {
        transform: rotate(0);
    }

    92% {
        transform: rotate(0);
    }

    94% {
        transform: rotate(-15deg);
    }

    96% {
        transform: rotate(15deg);
    }

    98% {
        transform: rotate(-15deg);
    }
}

@keyframes whatsapp-ping {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Online Status Dot */
.whatsapp-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    background-color: #00e676;
    border: 3px solid #fff;
    border-radius: 50%;
    z-index: 10;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float i {
        font-size: 28px;
    }

    .whatsapp-float .whatsapp-msg {
        display: none;
    }
}

/* Announcement Popup */
.announcement-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.announcement-modal .modal-body {
    padding: 0;
    position: relative;
}

.announcement-img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--agel-blue);
    transform: rotate(90deg);
}

/* Entry Animation */
.announcement-modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.4s ease-out;
}

.announcement-modal.show .modal-dialog {
    transform: scale(1);
}