/* =========================================================
   ESTILOS GENERALES
========================================================= */

/* =========================================================
   FONDO GLOBAL DEL BODY CON LOGO DE MARCA DE AGUA
========================================================= */

body {
    position: relative;
    overflow-x: hidden;
}

/* Logo como marca de agua */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('../img/logo.png'); /* AJUSTAR ruta si necesario */
    background-size: 100%;        /* Ajusta tamaño */
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;               /* Transparencia elegante */
    z-index: -1;                 /* Detrás de todo */
    pointer-events: none;        /* No molesta al usuario */
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
}

/* Sombra suave */
.card {
    border: none;
    border-radius: 12px;
    transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 25px rgba(0,0,0,.1);
}

/* Animaciones suaves */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp .8s forwards ease-out;
}

.delay-1 { animation-delay: .2s; }
.delay-2 { animation-delay: .4s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   HERO SECTION
========================================================= */

/* ================= HERO ANIMATION ================= */

.hero-section {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

/* Backlight animado */
.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: heroGlow 6s infinite alternate ease-in-out;
}

@keyframes heroGlow {
    0% { transform: scale(1) translate(0,0); opacity: 0.6; }
    100% { transform: scale(1.3) translate(5%,5%); opacity: 1; }
}

/* Animación entrada (subida + fade) */
.animate-up {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeUp 1.2s forwards ease-out;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Retrasos */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }



/* =========================================================
   SECCIÓN SERVICIOS
========================================================= */

.service-card img {
    border-radius: 12px 12px 0 0;
    height: 220px;
    object-fit: contain;
}

.service-card .card-body {
    padding: 20px;
}
/* Animación inicial */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}
.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), transparent);
    transition: width 0.4s ease;
}

.service-card:hover::before {
    width: 100%;
}


/* =========================================================
   SECCIÓN NOTICIAS
========================================================= */

.card img {
    height: 200px;
    object-fit: contain;
}
/* Tarjetas de noticias modernas */
.noticia-card {
    transition: 0.3s ease;
    border-radius: 12px;
}

.noticia-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 102, 204, 0.3);
}

.noticia-img {
    border-radius: 12px 12px 0 0;
    height: 220px;
    object-fit: cover;
}


/* =========================================================
   CTA FINAL
========================================================= */

.cta-section {
    background: linear-gradient(135deg, #007bff, #6610f2);
    padding: 80px 0;
}

.cta-section h2, 
.cta-section p {
    text-shadow: 0 3px 15px rgba(0,0,0,.4);
}

.cta-section .btn {
    border-radius: 50px;
    font-size: 1.2rem;
    padding: 12px 35px;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.nav-link {
    margin: 0 8px;
    font-weight: 600;
    transition: .3s;
}

.nav-link:hover {
    color: #007bff !important;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    background-color: #212529;
    color: #fff;
    padding: 30px 0;
    margin-top: 50px;
}

footer a {
    color: #ddd;
    transition: .3s;
}

footer a:hover {
    color: #fff;
}


/* =========================================================
   FORMULARIOS
========================================================= */

input, select, textarea {
    border-radius: 8px !important;
}

.btn-primary {
    border-radius: 8px;
    padding: 10px 18px;
}


/* =========================================================
   TARJETAS GENERALES
========================================================= */

.card-title {
    font-weight: 700;
}

.card-text {
    color: #555;
}

/* =========================================================
   SECCIÓN SOBRE MÍ
========================================================= */

.about-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
    margin-bottom: 20px;
}
.footer-social {
    font-size: 1.7rem;
    color: white;
    transition: 0.3s;
}

.footer-social:hover {
    color: #f8d210;
    transform: scale(1.15);
}
.flip-card {
    width: 100%;
    height: 330px;
    perspective: 1000px;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    position: relative;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
}

.flip-card-front {
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    text-align: center;
}

.flip-card-back {
    background: #333;
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    overflow-y: auto;
}
/* =====================================================
   TARJETAS FLIP - NOTICIAS
===================================================== */

.flip-card {
    background: transparent;
    width: 100%;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 10px;
    box-shadow: 0 4px 12px #0003;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card.active .flip-card-inner {
    transform: rotateY(180deg);
}

/* Lados */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.flip-card-front {
    background: #dfbfbf;
}

/* Imagen de portada */
.noticia-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.flip-card-back {
    background: #9abcde;
    color: #000;
    transform: rotateY(180deg);
    overflow-y: auto;
    padding: 20px;
}
/* =====================================================
   MAPA DE CONTACTO – DISEÑO PROFESIONAL
===================================================== */

.mapa-container {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mapa-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Versión más grande en pantallas amplias */
@media (min-width: 992px) {
    .mapa-container {
        height: 350px;
    }
}
/* ===========================================================
    FOOTER MODERNO
=========================================================== */

.footer {
    background: linear-gradient(135deg, #111, #222);
    color: white;
    border-top: 3px solid #ff66cc;
    box-shadow: 0 -3px 15px rgba(255, 0, 150, 0.2);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social .social-link {
    font-size: 28px;
    color: white;
    transition: 0.3s ease;
    padding: 10px;
    border-radius: 50%;
}

/* Hover brillante con glow */
.footer-social .social-link:hover {
    transform: scale(1.25) rotate(8deg);
    color: #ff66cc;
    box-shadow: 0 0 12px rgba(255, 102, 204, 0.8);
}

/* Animación "latido" */
.footer-social .social-link {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1);}
    50% { transform: scale(1.12);}
    100% { transform: scale(1);}
}

/* ==========================================
   NAVBAR: ESTILOS GLOBALES
========================================== */
.navbar-nav .nav-link {
    position: relative;
    padding: 8px 12px;
    transition: color 0.3s ease-in-out;
}

/* ==========================================
   LÍNEA ANIMADA DEBAJO DEL ENLACE
========================================== */
.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: #ffc107;
    transition: width 0.3s ease-in-out;
}

/* Hover → subrayado animado */
.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hover → color más claro */
.navbar-nav .nav-link:hover {
    color: #ffda44 !important;
}

/* ==========================================
   ESTILO PARA EL ACTIVO
========================================== */
.navbar-nav .nav-link.active {
    color: #ffc107 !important;
    font-weight: 700;
}

.navbar-nav .nav-link.active::after {
    width: 100%; /* la línea queda fija */
}

/* ==========================================
   NAVBAR ANIMACIÓN SUAVE
========================================== */
.navbar {
    transition: background-color 0.4s ease, padding 0.3s ease;
}
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.90);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    animation: slideUp 0.8s ease;
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.cookie-hide {
    display: none !important;
}
.footer-link {
    color: #ffc107;
    margin: 0 5px;
}

.footer-link:hover {
    text-decoration: underline;
    color: #fff;
}
/* ================================
   PÁGINAS LEGALES (Aviso / Privacidad / Cookies)
=================================== */
.legal-page {
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

.legal-page h1 {
    font-size: 2.5rem;
    border-left: 6px solid #0d6efd;
    padding-left: 15px;
    margin-bottom: 25px;
    font-weight: 700;
}

.legal-page h3 {
    margin-top: 30px;
    font-weight: 600;
    color: #0d6efd;
}

/* Caja con mejor lectura */
.legal-page .container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Botón volver al inicio */
.volver-btn {
    padding: 10px 25px;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: 0.3s;
}

.volver-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.footer-legal-link {
    color: #cccccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-legal-link:hover {
    color: #ffffff;
    text-decoration: underline;
}
/* ================================
    ANIMACIONES GLOBALES
================================ */

/* Estado inicial oculto */
.anim {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Cuando aparece en pantalla */
.anim.show {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes */
.anim-left {
    transform: translateX(-40px);
}

.anim-right {
    transform: translateX(40px);
}

.anim-zoom {
    transform: scale(0.8);
}

.anim-left.show,
.anim-right.show,
.anim-zoom.show {
    transform: none;
}

/* Delays */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

