/*
Theme Name: Coaching Matrona
Theme URI: https://coachingmatrona.com
Author: Coaching Matrona
Author URI: https://coachingmatrona.com
Description: Tema WordPress personalizado para Coaching Matrona - Acompañamiento integral para tu bienestar
Version: 1.0.0
License: GPL v2 or later
Text Domain: coaching-matrona
*/

/* Los estilos principales serán importados desde el archivo original */

/* Estilos específicos para WordPress */

/* Ajuste para el Admin Bar de WordPress */
body.admin-bar {
    padding-top: 0 !important;
}

/* Ajustar la top-bar cuando el admin bar está presente */
body.admin-bar .top-bar {
    top: 32px !important;
    position: relative;
}

@media screen and (max-width: 782px) {
    body.admin-bar .top-bar {
        top: 46px !important;
    }
}

/* Ajustar el navbar cuando el admin bar está presente */
body.admin-bar .navbar {
    top: 32px !important; /* Desktop admin bar height */
    position: relative;
}

@media screen and (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px !important; /* Mobile admin bar height */
    }
}

/* Si el navbar es sticky o fixed */
body.admin-bar .navbar.sticky,
body.admin-bar .navbar.fixed {
    top: 32px !important;
    position: fixed;
}

@media screen and (max-width: 782px) {
    body.admin-bar .navbar.sticky,
    body.admin-bar .navbar.fixed {
        top: 46px !important;
    }
}

/* Ajustar el hero y contenido principal */
body.admin-bar .hero,
body.admin-bar main,
body.admin-bar .page-hero,
body.admin-bar .blog-hero,
body.admin-bar .archive-hero,
body.admin-bar .post-hero {
    margin-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .hero,
    body.admin-bar main,
    body.admin-bar .page-hero,
    body.admin-bar .blog-hero,
    body.admin-bar .archive-hero,
    body.admin-bar .post-hero {
        margin-top: 46px;
    }
}

/* Ajustar sidebars sticky */
body.admin-bar .blog-sidebar,
body.admin-bar .archive-sidebar,
body.admin-bar .post-sidebar {
    top: 132px !important; /* 100px original + 32px admin bar */
}

@media screen and (max-width: 782px) {
    body.admin-bar .blog-sidebar,
    body.admin-bar .archive-sidebar,
    body.admin-bar .post-sidebar {
        top: 146px !important; /* 100px original + 46px mobile admin bar */
    }
}

/* Ajustar modales y overlays */
body.admin-bar .modal,
body.admin-bar .overlay {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .modal,
    body.admin-bar .overlay {
        top: 46px;
    }
}

/* Ajustar menú móvil */
body.admin-bar .mobile-menu {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .mobile-menu {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* Control del tamaño de las imágenes de servicios */
.courses-grid .course-image {
    width: 100%;
    height: 200px !important;
    min-height: 200px;
    max-height: 200px;
    position: relative;
    overflow: hidden;
    display: block;
}

.courses-grid .course-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.courses-grid .course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Control del tamaño del logo personalizado */
.logo-wrapper {
    display: inline-block;
    max-width: 200px;
    flex-shrink: 0;
}

.custom-logo-link {
    display: inline-block;
    max-width: 200px;
    height: auto;
}

.custom-logo {
    width: auto !important;
    height: auto !important;
    max-width: 200px !important;
    max-height: 80px !important;
    object-fit: contain !important;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand .logo {
    max-width: 80px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

/* Evitar que el logo deforme el layout */
.navbar {
    min-height: 100px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Ajustes responsive para el logo */
@media (max-width: 768px) {
    .custom-logo-link {
        max-width: 150px;
    }
    
    .custom-logo {
        max-height: 60px;
    }
    
    .nav-brand .logo {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Estilos para la sección de Blog */
.blog-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff6b6b;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #ff6b6b;
}

.blog-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

.blog-card-link {
    color: #ff6b6b;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.blog-card-link:hover {
    gap: 10px;
}

.blog-cta {
    text-align: center;
    margin-top: 50px;
}

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    color: #6c757d;
}

/* Responsive para la sección de blog */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-section {
        padding: 60px 0;
    }
}

/* ============================================
   ESTILOS PARA MENÚS DE WORDPRESS
   ============================================ */

/* Menú principal de navegación */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links .nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-links .nav-link:hover,
.nav-links .current-menu-item > a,
.nav-links .current-menu-parent > a {
    color: #ff6b6b;
}

/* Submenús (dropdown) */
.nav-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 1000;
}

.nav-links li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .sub-menu li {
    margin: 0;
}

.nav-links .sub-menu .nav-link {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.nav-links .sub-menu .nav-link:hover {
    background: #f8f9fa;
    color: #ff6b6b;
}

/* Flecha dropdown */
.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 0.3rem;
}

/* Botón CTA en navegación */
.nav-cta {
    margin-left: auto;
}

/* Menú móvil */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-nav {
    padding: 2rem 1rem;
}

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

.mobile-nav-links li {
    margin-bottom: 1rem;
}

.mobile-nav-links .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-nav-links .nav-link:hover,
.mobile-nav-links .current-menu-item > a {
    background: #f8f9fa;
    color: #ff6b6b;
}

.mobile-nav-links .sub-menu {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.mobile-cta {
    display: block;
    width: calc(100% - 2rem);
    margin: 2rem 1rem;
    text-align: center;
}

/* Menús del footer */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #ff6b6b;
}

/* Menú de redes sociales */
.social-links .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border-radius: 50%;
    margin-right: 0.5rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.social-links .social-icon:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
}

/* Footer contact info */
.footer-contact {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.footer-contact strong {
    color: #666;
}

/* Footer logo */
.footer-logo {
    max-width: 150px;
    height: auto;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Responsive para menús */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hamburger {
        display: flex;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Overlay para menú móvil */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

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