/* Estilos generales */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Estilos para el header en páginas de post individual */
.single .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
}

/* Estilos para el header en páginas secundarias */
.page .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
}

/* Añadir sombra suave al texto del menú en single para mejorar legibilidad */


/* Encabezados */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Enlaces */
a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

a:hover {
    color: var(--wp--preset--color--secondary);
}

/* Header */
.site-header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header-absolute {
    background-color: transparent;
}

.header-sticky {
    background-color: #004B9B;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header sticky en single post - estilo especial */
.single .header-sticky,
.page .header-sticky {
    background-color: #004B9B !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.header-logo {
    width: 140px;
    height: 35px;
    position: relative;
    z-index: 102;
}

.header-logo img,
.header-logo .custom-logo {
    width: 140px;
    height: 35px;
    object-fit: contain;
}

.main-navigation {
    display: flex;
    align-items: flex-start;
}
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 1rem;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #f0f0f0;
}

/* Versión del header con fondo para páginas internas */
.site-header:not(.header-absolute) {
    background-color: #004B9B;
    position: fixed;
}

/* Contenedor principal */
.site-main {
    width: 100%;
    margin: 0 auto;
    padding: 0rem;
    padding-top: 70px;
}

/* Página de inicio sin padding */
.no-padding {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.no-padding .entry-header,
.no-padding .entry-title {
    display: none !important;
}

/* Entradas del blog */
.entry-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.entry-content {
    margin-bottom: 2rem;
}

/* Los estilos del hero ahora están en su propio archivo: patterns/hero.css */

.button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--wp--preset--color--primary);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: var(--wp--preset--color--secondary);
    color: #FFFFFF;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.features__grid {
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item__icon {
    margin-bottom: 20px;
}

.feature-item__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--wp--preset--color--primary);
}

.feature-item__description {
    color: #666;
    line-height: 1.6;
}

.wp-element-button {
    background-color: #004B9B;
    color: #FFFFFF;
    border-radius: 0;
    padding: 15px 30px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.wp-element-button:hover {
    background-color: #004b9b43;
    transform: translateY(-5px);
}

/* Animaciones generales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

/* Clases de animación */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones para elementos específicos */
.titulo-info-pattern {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.titulo-info-pattern.visible {
    opacity: 1;
    transform: translateY(0);
}

.titulo-info-pattern.animation-started .titulo-info-imagen {
    animation: fadeInRight 0.8s ease-out forwards;
}

.titulo-info-pattern.animation-started .titulo-info-contenido {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.contacto-pattern {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.contacto-pattern.visible {
    opacity: 1;
    transform: translateY(0);
}

.contacto-pattern.animation-started .contacto-formulario {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.contacto-pattern.animation-started .contacto-info {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* Efectos parallax */
.parallax {
    transform: translateY(var(--parallax-y, 0));
    transition: transform 0.1s ease-out;
}

.parallax-slow {
    transform: translateY(calc(var(--parallax-y, 0) * 0.5));
    transition: transform 0.1s ease-out;
}

.parallax-medium {
    transform: translateY(calc(var(--parallax-y, 0) * 0.75));
    transition: transform 0.1s ease-out;
}

.parallax-fast {
    transform: translateY(calc(var(--parallax-y, 0) * 1.25));
    transition: transform 0.1s ease-out;
}

/* Optimización de performance para animaciones */
.animate-on-scroll,
.titulo-info-pattern,
.contacto-pattern,
.parallax,
.parallax-slow,
.parallax-medium,
.parallax-fast {
    will-change: opacity, transform;
}

/* Ajustes responsive para animaciones */
@media (max-width: 768px) {
    .titulo-info-pattern.animation-started .titulo-info-imagen,
    .titulo-info-pattern.animation-started .titulo-info-contenido,
    .contacto-pattern.animation-started .contacto-formulario,
    .contacto-pattern.animation-started .contacto-info {
        animation-duration: 0.6s;
    }
    
    .parallax,
    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none;
    }
}

/* Responsive Styles */
@media screen and (max-width: 767px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #004B9B;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .main-navigation.toggled {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation li {
        margin: 1rem 0;
        width: 100%;
    }

    .main-navigation a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.2rem;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Ajustes para el header en móvil */
    .header-container {
        padding: 0 15px;
    }

    .header-logo {
        width: 100px;
        height: 25px;
    }

    .header-logo img,
    .header-logo .custom-logo {
        width: 100px;
        height: 25px;
    }
}

/* Aquí se eliminaron los estilos de especialistas que ahora están en su propio archivo */

/* Estilos para el header del single post */
.single-post-wrapper .post-hero-section {
    position: relative;
    margin-bottom: 40px;
    overflow: hidden;
    margin-top: 0;
    padding-top: 98px;
}

.single-post-wrapper .hero__background {
    position: relative;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-post-wrapper .hero__content {
    position: relative;
    width: 100%;
    z-index: 10;
    padding: 40px 20px;
}

.single-post-wrapper .hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.single-post-wrapper .post-title {
    color: #ffffff;
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
}

.single-post-wrapper .post-meta {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 16px;
}

.single-post-wrapper .post-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.single-post-wrapper .post-categories a {
    background-color: #004B9B;
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.single-post-wrapper .post-categories a:hover {
    background-color: #0066CC;
    transform: translateY(-2px);
}

.single-post-wrapper .post-categories a::before {
    content: '#';
    margin-right: 5px;
    opacity: 0.7;
}

/* Estilos para la meta información */
.single-post-wrapper .post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 16px;
    opacity: 0.9;
}

.single-post-wrapper .post-meta span {
    position: relative;
    display: flex;
    align-items: center;
}

.single-post-wrapper .post-meta .post-date::before {
    content: '\f017'; /* Icono de reloj */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    margin-right: 8px;
}

.single-post-wrapper .post-meta .post-author::before {
    content: '\f007'; /* Icono de usuario */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    margin-right: 8px;
}

/* Animación para el título */
.single-post-wrapper .has-fade-in-animation {
    animation: fadeInUp 1.2s ease-out;
}

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

/* Estilos para el contenido del post */
.post-content-wrapper {
    padding: 40px 0;
}

.post-content-wrapper .entry-content {
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* Estilos para etiquetas */
.post-tags {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.post-tags h4 {
    margin-right: 10px;
    margin-bottom: 10px;
}

.post-tags span {
    background-color: #f1f1f1;
    padding: 5px 10px;
    border-radius: 3px;
    margin: 0 5px 5px 0;
    font-size: 14px;
}

/* Navegación entre posts */
.post-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    max-width: 45%;
}

.post-navigation a {
    text-decoration: none;
    color: #004B9B;
}

.post-navigation a:hover {
    text-decoration: underline;
}

/* Posts relacionados */
.related-posts {
    margin-top: 40px;
}

.related-posts h3 {
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #004B9B;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.related-post-card {
    border-radius: 8px;
    overflow: hidden;
}

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

.related-post-image {
    display: block;
    height: 200px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 15px;
}

.related-post-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.related-post-content h4 a {
    color: #333;
    text-decoration: none;
}

.related-post-content h4 a:hover {
    color: #004B9B;
}

.related-post-date {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .single-post-wrapper .post-title {
        font-size: 32px;
    }
    
    .single-post-wrapper .post-meta {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .single-post-wrapper .post-title {
        font-size: 26px;
    }
    
    .single-post-wrapper .post-categories a {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
    }
    
    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* Estilos para el hero en posts individuales */
.single-post-wrapper .hero__background_single {
    position: relative;
    min-height: 537px;
    margin-top: -98px;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 1; /* Asegurar que esté debajo del header */
}

.single-post-wrapper .hero__background_single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.single-post-wrapper .hero__background_single .hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 40px 20px;
}

.single-post-wrapper .post-title {
    color: #ffffff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.single-post-wrapper .post-meta {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 16px;
    opacity: 0.9;
}

/* Mejoras para la transición entre hero y contenido */
.single-post-wrapper .post-content-wrapper {
    position: relative;
    margin-top: -60px;
    padding-top: 60px;
    background-color: #fff;
    border-radius: 0px 0px 0 0;
    z-index: 5;
}

/* Añadir un efecto de desplazamiento para el contenido */
.single-post-wrapper .entry-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInContent 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Ajustes responsive para el header superpuesto */
@media (max-width: 768px) {
    .single-post-wrapper .post-hero-section {
        min-height: 400px;
        margin-top: -80px;
    }
    
    .single-post-wrapper .post-title {
        font-size: 32px;
        line-height: normal;
    }
    
    .single-post-wrapper .post-meta {
        font-size: 14px;
    }
    
    /* Mejoras para dispositivos móviles en animaciones */
    .titulo-info-pattern .titulo-info-imagen:hover {
        transform: translateY(-3px);
    }
    
    .titulo-info-pattern .titulo-info-imagen:hover img {
        transform: scale(1.02);
    }
    
    /* Optimización de performance para animaciones */
    .fadeIn, .fadeInUp, .fadeInDown, .fadeInLeft, .fadeInRight {
        will-change: opacity, transform;
    }
}

@media (max-width: 576px) {
    .single-post-wrapper .hero__background_single {
        height: 350px; /* Altura aún más reducida en móviles pequeños */
    }
}

/* Estilos del Menú Móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Estado activo del menú */
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Media queries para móvil */
@media screen and (max-width: 767px) {
    .header-container {
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .header-logo {
        width: 100px;
        height: 25px;
        flex-shrink: 0;
    }

    .header-logo img,
    .header-logo .custom-logo {
        width: 100px;
        height: 25px;
    }

    /* Botón del menú - ajustes para mayor visibilidad */
    .menu-toggle {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        padding: 15px;
        margin: 0;
        background-color: transparent;
        border: none;
        outline: none !important;
        z-index: 1001 !important;
    }

    .hamburger {
        width: 30px;
        height: 24px;
    }

    .bar {
        width: 100%;
        height: 3px;
        background-color: #fff !important;
        border-radius: 3px;
    }

    /* Navegación principal */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: -webkit-fill-available;
        background-color: #004B9B;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .main-navigation.active {
        right: 0;
    }

    /* Lista del menú */
    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .main-navigation li {
        margin: 1rem 0;
        width: 100%;
    }

    .main-navigation a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.2rem;
        color: #fff;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .main-navigation a:hover {
        color: #f0f0f0;
    }

    /* Overlay cuando el menú está abierto */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }

    /* Prevenir scroll cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
    }
}

/* Ajustes para el logo */
.site-branding {
    position: relative;
    z-index: 1001;
}

/* Clase para asegurar el header transparente en single posts */
.single-with-transparent-header .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
}

/* Estilos para el Footer */
.site-footer {
    padding: 40px 0 20px;
    color: #fff;
}

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

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo .custom-logo {
    max-width: 150px;
    height: auto;
}

.footer-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-navigation li {
    margin-right: 20px;
}

.footer-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.footer-navigation a:hover {
    text-decoration: underline;
}

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

.footer-social .social-links li {
    margin-left: 15px;
}

.footer-social .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
}

.footer-social .social-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.footer-social .social-links img {
    width: 26px;
    height: 26px;
}

.footer-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.footer-policy {
    text-align: center;
}

.policy-navigation ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.policy-navigation li {
    margin: 0 15px 10px;
}

.policy-navigation a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.policy-navigation a:hover {
    color: #fff;
    text-decoration: underline;
}

.logo-kit{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.logo-kit img{
    max-width: 320px;
}

/* Responsive para el footer */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .footer-navigation li {
        margin: 0 10px 10px;
    }
    
    .footer-social {
        margin-top: 20px;
    }
    
    .footer-social .social-links {
        justify-content: center;
    }
    
    .footer-social .social-links li {
        margin: 0 7px;
    }
    
    .policy-navigation li {
        margin: 0 10px 10px;
    }
}
