/*
Theme Name: La Chorrera Theme
Theme URI: https://lachorrera.org
Author: Antigravity
Author URI: https://lachorrera.org
Description: Tema optimizado y ultra rápido para el directorio La Chorrera.
Version: 1.0.0
Text Domain: lachorrera
*/

:root {
    --primary-color: #2563eb;       
    --secondary-color: #f59e0b;     
    --accent-color: #059669;        
    
    /* Paleta de Fondos e Interfaces */
    --bg-dark-main: #111827;       
    --bg-card: #ffffff;            
    --bg-muted-light: #f3f4f6;     
    --bg-suggested-card: #f9fafb;  
    
    /* Tipografías */
    --text-dark-main: #111827;     
    --text-dark-muted: #4b5563;    
    --text-light-muted: #9ca3af;   
    
    --border-light: #e5e7eb;       
    --border-radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark-main);
    padding: 20px;
    line-height: 1.6;
}

/* Encabezado Principal */
.main-header {
    max-width: 800px;
    margin: 0 auto 12px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-decoration: none;
}
.logo span {
    color: var(--primary-color);
}
.logo img {
    max-height: 40px;
    width: auto;
}

/* Migas de Pan (Breadcrumbs) */
.breadcrumbs {
    max-width: 800px;
    margin: 0 auto 12px auto;
    font-size: 0.85rem;
    color: var(--text-light-muted);
}
.breadcrumbs a {
    color: #60a5fa;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span {
    margin: 0 8px;
}

/* Contenedor Blanco Principal */
.container {
    max-width: 800px;
    margin: 0 auto 40px auto;
    background: var(--bg-card);
    color: var(--text-dark-main);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
}

.container.no-padding {
    padding: 0;
}

/* Buscador Principal (Home) */
.search-hero {
    text-align: center;
    padding: 20px 0 32px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 28px;
}
.search-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark-main);
}
.search-hero p {
    color: var(--text-dark-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}

.search-bar-container {
    display: flex;
    background: var(--bg-muted-light);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    max-width: 600px;
    margin: 0 auto;
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark-main);
}
.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.search-btn:hover {
    background-color: #1d4ed8;
}

/* Secciones Internas */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark-main);
}
.single-section-title {
    font-size: 1.3rem;
    margin-bottom: 14px;
    margin-top: 28px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

/* Categorías */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}
.category-card {
    background: var(--bg-suggested-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark-main);
    transition: background-color 0.2s, border-color 0.2s;
}
.category-card:hover {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.category-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.category-name {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-light);
    margin: 28px 0;
}

/* Lista de Negocios */
.business-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.business-row-card {
    display: flex;
    background: var(--bg-suggested-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark-main);
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}
.business-row-card:hover {
    border-color: var(--primary-color);
    background-color: #ffffff;
}
.card-thumbnail {
    width: 140px;
    min-width: 140px;
    background-size: cover;
    background-position: center;
}
.card-details {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-header-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark-main);
    padding-right: 70px;
}
.card-meta-tags {
    font-size: 0.8rem;
    color: var(--text-dark-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
.card-stars {
    color: var(--secondary-color);
    font-size: 0.85rem;
}
.vip-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.2);
    z-index: 2;
}

/* Hero Ficha de Negocio */
.business-hero {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.8)) center/cover;
    height: 280px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: white;
}
.badge-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}
.hero-info h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.rating-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stars {
    color: var(--secondary-color);
}
.content-wrapper {
    padding: 24px;
}

/* Estado y Zona (Ficha) */
.quick-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-muted-light);
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
}
.status-badge { 
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 0.9rem;
    color: var(--text-dark-muted);
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2ECC71;
    box-shadow: 0 0 0 2px rgba(46,204,113,0.2);
    animation: blink 2s infinite;
    flex-shrink: 0;
}
.status-dot.closed {
    background: #E74C3C;
    box-shadow: 0 0 0 2px rgba(231,76,60,0.2);
    animation: none;
}
.status-badge strong { color: var(--text-dark-main); font-weight: 600; }
.status-badge.is-closed strong { color: #c0392b; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* Botones Ficha */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
    font-size: 0.95rem;
    width: 100%;
}
.btn:hover { opacity: 0.9; }
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-success { background-color: #22c55e; color: white; }
.btn-outline { border: 2px solid var(--border-light); background: transparent; color: var(--text-dark-main); }
.btn-outline:hover { background: var(--bg-muted-light); }
.btn-premium-menu {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Galería */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.photo-gallery.carousel-mode {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.photo-gallery.carousel-mode .gallery-item {
    flex: 0 0 80%;
    scroll-snap-align: center;
}
@media (min-width: 600px) {
    .photo-gallery.carousel-mode .gallery-item {
        flex: 0 0 45%;
    }
}
.gallery-item {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}
.gallery-item img:hover {
    opacity: 0.85;
}

/* Sobre Nosotros */
.description {
    color: var(--text-dark-muted);
    margin-bottom: 24px;
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}
.social-icon.facebook { background-color: #1877f2; }
.social-icon.instagram { background-color: #e1306c; }
.social-icon.twitter { background-color: #000000; }
.social-icon.tiktok { background-color: #000000; }
.social-icon.website { background-color: var(--primary-color); }

/* Horarios */
.schedule-list {
    list-style: none;
    margin-bottom: 16px;
}
.schedule-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
    color: var(--text-dark-muted);
}
.current-day {
    font-weight: bold;
    color: var(--primary-color) !important;
}

/* Servicios */
.amenities-box {
    background: var(--bg-suggested-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}
.amenities-box h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-dark-muted);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.amenities-list {
    list-style: none;
    padding-left: 4px;
}
.amenities-list li {
    font-size: 0.95rem;
    color: var(--text-dark-muted);
    padding: 4px 0 4px 18px;
    position: relative;
}
.amenities-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 1px;
}

/* Mapa */
.map-container {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* FAQs */
.faq-wrapper {
    margin-bottom: 24px;
}
.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.faq-item summary {
    padding: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    user-select: none;
    color: var(--text-dark-main);
    transition: background-color 0.2s;
}
.faq-item summary:hover {
    background-color: var(--bg-muted-light);
}
.faq-item p {
    padding: 0 14px 14px 14px;
    color: var(--text-dark-muted);
    font-size: 0.9rem;
    border-top: 1px solid transparent;
}
.faq-item[open] summary {
    background-color: var(--bg-suggested-card);
}

/* Reseñas */
.review-box {
    background: var(--bg-muted-light);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}
.review-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dark-muted);
    margin-bottom: 6px;
}
.review-user { font-weight: bold; color: var(--text-dark-main); }

/* Grid sugeridos */
.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.suggested-card {
    background: var(--bg-suggested-card);
    color: var(--text-dark-main);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
    display: block;
}
.suggested-card:hover {
    border-color: var(--primary-color);
    background-color: #ffffff;
}
.suggested-img {
    height: 120px;
    background-size: cover;
    background-position: center;
}
.suggested-content {
    padding: 12px;
}
.suggested-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-dark-main);
}
.suggested-meta {
    font-size: 0.8rem;
    color: var(--text-dark-muted);
    display: flex;
    justify-content: space-between;
}
.ad-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-footer {
    text-align: center;
    padding: 20px 0 10px 0;
    font-size: 0.85rem;
    color: var(--text-light-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .business-row-card {
        flex-direction: column;
    }
    .card-thumbnail {
        width: 100%;
        height: 130px;
    }
    .search-hero h1 {
        font-size: 1.6rem;
    }
}
@media (max-width: 480px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
    .btn-premium-menu {
        grid-column: unset;
    }
}
