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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.school-header-modern {
    background: linear-gradient(135deg, #23446e 0%, #2f80ed 100%);
    padding: 3rem 0 3.25rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.school-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-logo {
    height: 105px;
    width: 105px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.hero-slogan {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
    font-style: italic;
}

.hero-social-corner {
    position: absolute;
    top: 14px;
    z-index: 2;
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.2);
    backdrop-filter: blur(6px);
}

.hero-social-right {
    right: 12px;
}

.hero-social-left {
    left: 12px;
}

.hero-social-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.09);
    transition: all 0.2s ease;
    font-size: 0.92rem;
}

.hero-social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#imagenesCarousel {
    margin: -40px auto 2.5rem;
    max-width: 94%;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

#imagenesCarousel .carousel-item {
    height: 420px;
}

#imagenesCarousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    transition: transform 0.3s ease;
}

#imagenesCarousel .carousel-item:hover img {
    transform: scale(1.05);
}

#imagenesCarousel .carousel-control-prev,
#imagenesCarousel .carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#imagenesCarousel .carousel-control-prev:hover,
#imagenesCarousel .carousel-control-next:hover {
    opacity: 1;
}

.welcome-section {
    animation: fadeInUp 1s ease-out 0.5s backwards;
}

.modern-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

.star-icon {
    animation: pulse 2s ease-in-out infinite;
    display: inline-block;
}

#anunciosCarousel .card {
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

#anunciosCarousel .card:hover {
    transform: scale(1.02);
}

#anunciosCarousel .carousel-control-prev,
#anunciosCarousel .carousel-control-next {
    width: 3rem;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s;
}

#anunciosCarousel .carousel-control-prev:hover,
#anunciosCarousel .carousel-control-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

#anunciosCarousel .carousel-control-prev {
    left: -1.25rem;
}

#anunciosCarousel .carousel-control-next {
    right: -1.25rem;
}

.social-card {
    background: linear-gradient(135deg, #23446e 0%, #2f80ed 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(47, 128, 237, 0.3);
    animation: fadeInUp 1s ease-out 0.7s backwards;
}

.social-card h4 {
    color: white;
    font-weight: 600;
}

.social-card .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.btn-social {
    border: 2px solid white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 10px;
}

.btn-social:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-social.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.anuncio-badge {
    animation: slideInLeft 0.5s ease-out;
}

.alert-modern {
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.anuncio-card {
    border-left: 5px solid var(--prioridad-color, #6c757d) !important;
}

.anuncio-card-header {
    background: linear-gradient(135deg, var(--prioridad-color, #6c757d) 0%, var(--prioridad-color-dark, #5a6268) 100%);
    color: white;
}

.prioridad-urgente {
    --prioridad-color: #dc3545;
    --prioridad-color-dark: #c82333;
}

.prioridad-alta {
    --prioridad-color: #ffc107;
    --prioridad-color-dark: #e0a800;
}

.prioridad-normal {
    --prioridad-color: #6c757d;
    --prioridad-color-dark: #5a6268;
}

.anuncio-contenido {
    white-space: pre-line;
    line-height: 1.8;
}

.anuncio-carousel-icon {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    background-size: 55% 55%;
}

.btn-publicar-anuncio {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: 12px 40px;
}

.info-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.info-card .btn {
    border-radius: 10px;
}

.quick-actions-strip {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-actions-strip .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.9rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-logo {
        height: 78px;
        width: 78px;
    }
    #imagenesCarousel {
        margin: -24px auto 2rem;
    }
    #imagenesCarousel .carousel-item {
        height: 230px;
    }
    .section-title {
        font-size: 1.35rem;
    }
    #anunciosCarousel .carousel-control-prev {
        left: 0.25rem;
    }
    #anunciosCarousel .carousel-control-next {
        right: 0.25rem;
    }
    .hero-social-corner {
        position: static;
        margin: 0 auto 1rem;
        width: fit-content;
    }
}
