/* ============================================
   ESTILOS PARA IMPRESIÓN
   ============================================ */

@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        width: 100%;
        margin: 0;
        padding: 0;
        line-height: 1.4;
        font-size: 12pt;
        color: #333;
        background: white;
        font-family: Georgia, 'Times New Roman', serif;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    .no-print,
    .header,
    .nav-links,
    .nav-cta,
    .hero-buttons,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .footer,
    .cta-buttons {
        display: none !important;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, ul, ol {
        page-break-inside: avoid;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   ESTILOS DE ACCESIBILIDAD
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark-gray: #ECF0F1;
        --light-gray: #2C3E50;
    }

    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .nav-links a {
        color: #e0e0e0;
    }

    .service-card,
    .sitter-card,
    .testimonial-card,
    .pricing-card,
    .feature-card {
        background-color: #2a2a2a;
    }

    .testimonial-text,
    .service-card p,
    .feature-card p {
        color: #c0c0c0;
    }
}

/* ============================================
   ESTILOS PARA PANTALLA GRANDE
   ============================================ */

@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }

    .hero-content h1 {
        font-size: 52px;
    }

    .services-grid,
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   ESTILOS DE COMPATIBILIDAD
   ============================================ */

/* Fallback para navegadores sin CSS Grid */
@supports not (display: grid) {
    .services-grid,
    .features-grid,
    .sitters-grid,
    .testimonials-grid,
    .pricing-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .service-card,
    .feature-card,
    .sitter-card,
    .testimonial-card,
    .pricing-card {
        flex: 1 1 calc(33.333% - 20px);
        margin: 10px;
    }
}

/* ============================================
   OPTIMIZACIONES DE RENDIMIENTO
   ============================================ */

/* Lazy loading para imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* Optimización de fuentes */
@font-face {
    font-family: 'FontAwesome';
    font-display: swap;
}

/* Animaciones GPU-aceleradas */
.feature-card,
.service-card,
.sitter-card,
.testimonial-card {
    will-change: transform;
}

/* ============================================
   ESTILOS DE ENLACE PARA SEO
   ============================================ */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #E55A8B;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   ESTILOS DE FORMULARIO
   ============================================ */

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

/* ============================================
   ESTILOS DE TABLA
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: var(--light-gray);
    font-weight: 600;
}

tr:hover {
    background-color: var(--light-gray);
}

/* ============================================
   ESTILOS DE LISTA
   ============================================ */

ul,
ol {
    margin: 20px 0;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

/* ============================================
   ESTILOS DE CÓDIGO
   ============================================ */

code {
    background-color: var(--light-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

pre {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
   ESTILOS DE BLOCKQUOTE
   ============================================ */

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

/* ============================================
   ESTILOS DE PROGRESO
   ============================================ */

progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background-color: #e0e0e0;
    border: none;
}

progress::-webkit-progress-bar {
    background-color: #e0e0e0;
    border-radius: 4px;
}

progress::-webkit-progress-value {
    background-color: var(--primary-color);
    border-radius: 4px;
}

progress::-moz-progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* ============================================
   ESTILOS DE BADGE
   ============================================ */

.badge {
    display: inline-block;
    background-color: #f0f0f0;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.badge:hover {
    background-color: var(--primary-color);
    color: white;
}

.badge.success {
    background-color: #4CAF50;
    color: white;
}

.badge.warning {
    background-color: #FF9800;
    color: white;
}

.badge.danger {
    background-color: #F44336;
    color: white;
}

.badge.info {
    background-color: var(--secondary-color);
    color: white;
}

/* ============================================
   ESTILOS DE CARD GENÉRICO
   ============================================ */

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-body {
    padding: 15px 0;
}

.card-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 15px;
}

/* ============================================
   ESTILOS DE MODAL/OVERLAY
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1300;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* ============================================
   ESTILOS DE ALERT
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert.success {
    background-color: #d4edda;
    border-color: #4CAF50;
    color: #155724;
}

.alert.warning {
    background-color: #fff3cd;
    border-color: #FF9800;
    color: #856404;
}

.alert.danger {
    background-color: #f8d7da;
    border-color: #F44336;
    color: #721c24;
}

.alert.info {
    background-color: #d1ecf1;
    border-color: var(--secondary-color);
    color: #0c5460;
}

/* ============================================
   ESTILOS DE PAGINACIÓN
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================
   ESTILOS DE SPINNER/LOADER
   ============================================ */

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   ESTILOS DE BREADCRUMB
   ============================================ */

.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
}

/* ============================================
   ESTILOS DE TOOLTIP
   ============================================ */

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted var(--primary-color);
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1200;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
