/**
 * Theme Name: Limpiezas Lorena
 * Theme URI: https://limpiezaslorena.es
 * Author: Daniel Díaz
 * Author URI: https://elaboral.es
 * Description: Limpieza integral profesional en la Axarquia
 * Version: 1.0.0
 * License: GPL v2 or later
 * Text Domain: limpiezas-lorena
 * Domain Path: /languages
 */

/* ==========================================================================
   Reset y Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

/* ==========================================================================
   Variables CSS Personalizadas
   ========================================================================== */

:root {
    --color-primary: #32373c;
    --color-primary-dark: #1a5fa8;
    --color-primary-light: #3d8cdb;
    --color-secondary: #51a3e1;
    --color-secondary-dark: #3d8fd1;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg-light: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #e0e0e0;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 5px 20px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
    
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 25px;
    --radius-round: 50px;
    
    --container-max: 1200px;
    --header-height: 80px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-light);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: var(--radius-round);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(81, 163, 225, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-dark {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-dark:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input,
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

/* ==========================================================================
   WordPress Classes
   ========================================================================== */

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 968px) {
    .section {
        padding: 60px 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
}

/* Mobile */
@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        font-size: 12pt;
    }
    
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-rendering-optimize {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.no-fouc {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.no-fouc.loaded {
    visibility: visible;
    opacity: 1;
}