/*
Theme Name: Legalike
Theme URI: https://legalike.com
Author: Legalike Team
Author URI: https://legalike.com
Description: Tema personalizado para Legalike - Soporte Empresarial. Página profesional de servicios legales y empresariales.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: legalike
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Utilidades y Estilos Base (NO usar @tailwind ni @apply)
   ========================================================================== */

/* Asegurar smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos para contenido de WordPress */
.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Estilos de accesibilidad */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Utilidades para formularios */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
}

button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #14245E;
  outline-offset: 2px;
}

/* Transiciones suaves */
a,
button,
.transition {
  transition: all 0.3s ease;
}

/* Clearfix */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================================================================
   Header y Navegación Personalizada - VERSIÓN AZULADA
   ========================================================================== */

/* Header con fondo azul muy claro inspirado en el logo */
#main-header {
    background: linear-gradient(135deg, #e8ecf4 0%, #dce3f0 50%, #e8ecf4 100%);
    border-bottom: 3px solid #B2885F;
}

/* Header scroll effect - fondo azul más definido */
#main-header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #d5dce8 0%, #c8d2e2 50%, #d5dce8 100%);
    border-bottom-color: #8f6d4c;
}

/* Logo se reduce al hacer scroll */
#main-header.scrolled .logo-container img {
    max-height: 65px;
}

/* Logo personalizado */
.logo-container img {
    max-height: 85px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container:hover img {
    transform: scale(1.05);
}

/* Navegación Desktop */
#main-header nav ul li {
    position: relative;
}

#main-header nav ul li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

#main-header nav ul li a:hover {
    color: #14245E;
    background-color: rgba(20, 36, 94, 0.08);
}

/* Efecto underline animado */
#main-header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: linear-gradient(to right, #B2885F, #14245E);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#main-header nav ul li a:hover::after,
#main-header nav ul li a.active::after {
    transform: scaleX(1);
}

/* Item activo */
#main-header nav ul li a.active {
    color: #14245E;
    font-weight: 700;
}

/* Menú móvil */
#mobile-menu ul li a {
    display: block;
    padding: 0.875rem 1rem;
    color: #333;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

#mobile-menu ul li a:hover {
    background-color: rgba(20, 36, 94, 0.08);
    color: #14245E;
    padding-left: 1.5rem;
}

/* Animación del menú móvil */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Botón contactar con color dorado sólido */
.bg-secondary {
    background-color: #B2885F !important;
}

.bg-secondary:hover {
    background-color: #8f6d4c !important;
}

/* Asegurar espacio en el header para elementos */
#main-header .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Botón contactar - espacio adicional */
#main-header a[href*="contacto"] {
    margin-right: 0.5rem;
    min-width: fit-content;
}

/* Iconos SVG del menú móvil */
#mobile-menu-button svg {
    transition: transform 0.3s ease;
}

#mobile-menu-button:hover svg {
    transform: scale(1.1);
}

/* ==========================================================================
   Footer Estilos - Colores del Logo
   ========================================================================== */

/* Fondo azul oscuro del footer */
footer {
    background-color: #14245E !important;
    border-top: 4px solid #B2885F !important;
}

/* Títulos en dorado */
footer h4,
footer .footer-column h4 {
    color: #B2885F !important;
    font-family: 'Playfair Display', serif;
}

/* Textos en gris claro */
footer p,
footer span,
footer li {
    color: #BFC1C3 !important;
}

/* Enlaces en gris claro que cambian a dorado */
footer a {
    color: #BFC1C3 !important;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #B2885F !important;
}

/* Iconos en dorado - EXCEPTO redes sociales */
footer i:not(.fa-brands) {
    color: #B2885F !important;
}

/* Contenedor del logo con fondo blanco semi-transparente */
footer .logo-container {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #B2885F;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

footer .logo-container img {
    max-height: 60px !important;
    width: auto;
    filter: none !important;
    opacity: 1 !important;
}

/* Botones de redes sociales - FONDO DORADO CON ICONOS BLANCOS */
footer a[aria-label] {
    background-color: #B2885F !important;
    color: #FFFFFF !important;
}

footer a[aria-label]:hover {
    background-color: #8f6d4c !important;
}

footer a[aria-label] i {
    color: #FFFFFF !important;
}

/* Asegurar que los iconos de redes sociales sean blancos */
footer .fa-brands {
    color: #FFFFFF !important;
}

/* Línea divisoria */
footer .border-t {
    border-color: rgba(178, 136, 95, 0.3) !important;
}

/* Nombre del sitio resaltado */
footer .text-secondary {
    color: #B2885F !important;
}

/* Separador dorado */
footer span.text-secondary {
    color: #B2885F !important;
}

/* ==========================================================================
   Secciones de la Página Principal - Separación Visual
   ========================================================================== */

/* Asegurar que las secciones tengan separación clara */
section {
    position: relative;
}

/* Sombra sutil en las secciones para profundidad */
section:not(:first-child) {
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Fondo azul claro para About Section */
.bg-blue-light {
    background: linear-gradient(135deg, #e8ecf4 0%, #dce3f0 100%) !important;
}

/* Mejorar contraste del texto en secciones oscuras */
section.bg-gradient-to-br h2,
section.bg-gradient-to-br h3,
section.bg-gradient-to-br p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Estilos para contenido de servicios
   ========================================================================== */

/* Contenedor del contenido de servicios */
.servicio-content {
    color: #333;
    line-height: 1.8;
}

/* Títulos H2 en el contenido */
.servicio-content h2 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #14245E !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.5rem !important;
    font-family: 'Playfair Display', serif !important;
    line-height: 1.3 !important;
}

/* Títulos H3 en el contenido */
.servicio-content h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #14245E !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    font-family: 'Playfair Display', serif !important;
    line-height: 1.4 !important;
}

/* Títulos H4 */
.servicio-content h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #14245E !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

/* Párrafos con espaciado adecuado */
.servicio-content p {
    margin-bottom: 1.5rem !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
}

/* Listas con espaciado */
.servicio-content ul,
.servicio-content ol {
    margin-bottom: 1.5rem !important;
    margin-top: 1rem !important;
    padding-left: 2.5rem !important;
}

.servicio-content ul li,
.servicio-content ol li {
    margin-bottom: 0.75rem !important;
    line-height: 1.7 !important;
}

/* Viñetas de listas */
.servicio-content ul {
    list-style-type: disc !important;
}

.servicio-content ul li {
    display: list-item !important;
}

/* Negritas */
.servicio-content strong {
    font-weight: 700 !important;
    color: #14245E !important;
}

/* Cajas de alerta/información */
.servicio-content div[style*="background"] {
    border-radius: 0.5rem !important;
    margin: 1.5rem 0 !important;
    padding: 1rem !important;
}

/* Enlaces */
.servicio-content a {
    color: #B2885F !important;
    text-decoration: underline !important;
    transition: color 0.3s !important;
}

.servicio-content a:hover {
    color: #8f6d4c !important;
}

/* Separadores */
.servicio-content hr {
    border: 0 !important;
    border-top: 2px solid #e5e7eb !important;
    margin: 2rem 0 !important;
}

/* Eliminar margen superior del primer elemento */
.servicio-content > *:first-child {
    margin-top: 0 !important;
}
