/* GUÍA GOURMET AEHT - v3 Inspirado en Michelin Guide */
/* Mobile-first, limpio, elegante */

:root {
    --primary: #2C8BCC;
    --button: #2C8BCC;
    --accent: #FCA311;
    --dark: #000000;
    --light: #f7f7f7;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-light: #666666;
    --border: #e5e5e5;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.14);
    --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--white);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-bottom: 1px solid var(--border);
}

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

.navbar-brand img { max-height: 70px; width: auto; }

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.navbar-menu a:hover { color: var(--primary); }

.dropdown { position: relative; }

.dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    margin-top: 0.5rem;
    box-shadow: var(--shadow-hover);
    z-index: 1002;
}

.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }

.dropdown-menu li a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition);
}

.dropdown-menu li a:hover { background: var(--light); color: var(--primary); }

/* ==================== HERO ==================== */
.hero {
    background: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--button);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-search {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
    justify-content: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 139, 204, 0.1);
}

.btn-search, .btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary, .btn-search {
    background: var(--button);
    color: var(--white);
}

.btn-primary:hover, .btn-search:hover {
    background: #1e6fa8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover { background: var(--button); color: var(--white); }

/* ==================== FILTERED VIEW ==================== */
.filtered-header {
    background: var(--white);
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.filtered-badge-row {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filtered-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.filtered-badge-close {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity var(--transition);
    line-height: 1;
}

.filtered-badge-close:hover { opacity: 1; }

.filtered-search {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

/* ==================== FILTROS ==================== */
.filtros {
    background: var(--light);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.filtros-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

.filtro-grupo { display: flex; flex-direction: column; }

.filtro-grupo label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filtro-grupo select {
    padding: 0.7rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition);
}

.filtro-grupo select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== RESTAURANTS GRID ==================== */
.seccion-restaurantes { background: var(--white); padding: 3rem 2rem; }

.seccion-restaurantes h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.restaurantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.restaurante-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.restaurante-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.restaurante-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light);
}

.restaurante-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.9rem;
}

.restaurante-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.restaurante-card h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.categoria {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ubicacion {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.descripcion {
    color: var(--text-light);
    font-size: 0.9rem;
    flex: 1;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.restaurante-card-footer { margin-top: auto; }

.card-link {
    color: var(--button);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.restaurante-card:hover .card-link { color: #1e6fa8; }

/* ==================== MAPA ==================== */
.seccion-mapa {
    background: var(--light);
    padding: 1.5rem 2rem 0.5rem;
}

.seccion-mapa--inline {
    padding: 0;
    background: transparent;
}

.mapa-principal {
    width: 100%;
    height: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 10;
}

.mapa-principal--inline {
    height: 340px;
    border-radius: 0;
    box-shadow: none;
}

.mapa-link-full {
    text-align: right;
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem 0;
}

.mapa-link-full a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.mapa-link-full a:hover { text-decoration: underline; }

/* Mapa pàgina completa */
.mapa-page-wrap {
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.mapa-full {
    flex: 1;
    width: 100%;
    z-index: 10;
}

/* ==================== PAGINACION ==================== */
.paginacion {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.paginacion a, .paginacion .activo {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    font-size: 0.9rem;
}

.paginacion a:hover { background: var(--button); color: var(--white); border-color: var(--button); }
.paginacion .activo { background: var(--button); color: var(--white); border-color: var(--button); }

/* ==================== FICHA RESTAURANTE ==================== */
.ficha-restaurante {
    padding: 2rem;
    background: var(--light);
    min-height: 60vh;
}

.ficha-back {
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    display: inline-block;
    font-weight: 500;
    transition: color var(--transition);
}

.ficha-back:hover { color: #1e6fa8; }

.ficha-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.ficha-hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.ficha-header h1 {
    font-size: 2rem;
    color: var(--dark);
    margin: 0;
    font-weight: 700;
}

.ficha-tipologia {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ficha-admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-edit {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.btn-edit:hover { background: #1e6fa8; transform: translateY(-1px); }

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.btn-delete:hover { background: #b02a37; transform: translateY(-1px); }

.ficha-descripcion {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.ficha-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ficha-info-single { grid-template-columns: 1fr; }

.ficha-info-block h3 {
    color: var(--button);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.ficha-info-block p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ficha-info-block a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.ficha-info-block a:hover { color: #1e6fa8; text-decoration: underline; }

.ficha-desc-curta {
    color: var(--text-light);
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.ficha-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.badge-diet, .badge-days, .badge-hours {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-diet { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-days { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-hours { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Michelin-style action buttons: white, rounded, subtle */
.ficha-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.ficha-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid #e0e0e0;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
}

.ficha-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ficha-btn-reserva {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
    font-weight: 600;
}

.ficha-btn-reserva:hover {
    background: #1e6fa8 !important;
    box-shadow: 0 4px 12px rgba(44,139,204,0.25);
}

.ficha-btn-phone { }
.ficha-btn-web { }
.ficha-btn-map { }
.ficha-btn-social { }

.ficha-contact-info {
    background: var(--light);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.ficha-contact-info p {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.ficha-contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.ficha-contact-info a:hover { text-decoration: underline; }

.ficha-section-title {
    color: var(--dark);
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.ficha-mapa {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
}

.footer-support {
    text-align: center;
    padding-bottom: 2rem;
}

.footer-support h3 {
    color: var(--button);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.support-logos-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.support-logos-footer img {
    max-height: 55px;
    width: auto;
    opacity: 0.85;
    transition: opacity var(--transition);
}

.support-logos-footer img:hover { opacity: 1; }

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1.5rem 0;
}

.footer-logo { max-width: 120px; margin-bottom: 1rem; }

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    margin-bottom: 1.5rem;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.footer-bottom p { margin-bottom: 0.4rem; }

.footer-bottom a {
    color: var(--button);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--accent); }

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.loading, .error { padding: 2rem; text-align: center; color: var(--text-light); }
.error { color: var(--dark); }

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar-menu.open { display: flex; }

    .navbar-menu > li {
        border-bottom: 1px solid var(--border);
    }

    .navbar-menu > li > a {
        display: block;
        padding: 1rem 0;
        font-size: 1.05rem;
    }

    .dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        margin: 0;
        padding-left: 1rem;
        display: none;
        background: var(--light);
        border-radius: 0;
    }

    .dropdown.open .dropdown-menu { display: block; }

    .dropdown-menu li a { padding: 0.6rem 1rem; }

    .hero { padding: 2.5rem 1.5rem; }
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; margin-bottom: 1.5rem; }

    .hero-search {
        flex-direction: column;
        max-width: 100%;
    }

    .hero-search .search-input { min-width: 100%; }

    .filtros { padding: 1rem 1.5rem; }
    .filtros-row { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

    .restaurantes-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
    .restaurante-card-image { height: 170px; }

    .mapa-principal { height: 300px; }

    .seccion-restaurantes { padding: 2rem 1.5rem; }
    .seccion-mapa { padding: 2rem 1.5rem; }

    .ficha-restaurante { padding: 1.5rem; }
    .ficha-card { padding: 1.5rem; }
    .ficha-header h1 { font-size: 1.6rem; }
    .ficha-hero-img { max-height: 280px; }
    .ficha-info-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .ficha-mapa { height: 300px; }
    .ficha-actions { gap: 0.5rem; }
    .ficha-btn { flex: 1 1 calc(50% - 0.5rem); justify-content: center; font-size: 0.85rem; padding: 0.6rem 0.8rem; }

    .filtered-header { padding: 1.5rem; }
    .filtered-search { max-width: 100%; flex-direction: column; }

    .support-logos-footer { gap: 1.5rem; }
    .support-logos-footer img { max-height: 45px; }
}

/* Mobile */
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .navbar-brand img { max-height: 55px; }

    .hero { padding: 2rem 1rem; }
    .hero h2 { font-size: 1.5rem; }

    .filtros-row { grid-template-columns: 1fr; }

    .restaurantes-grid { grid-template-columns: 1fr; }
    .restaurante-card-image { height: 200px; }

    .mapa-principal { height: 250px; }

    .seccion-restaurantes { padding: 1.5rem 1rem; }
    .seccion-restaurantes h2 { font-size: 1.4rem; }
    .seccion-mapa { padding: 1.5rem 1rem; }
    .seccion-mapa h2 { font-size: 1.4rem; }

    .ficha-restaurante { padding: 1rem; }
    .ficha-card { padding: 1rem; }
    .ficha-header h1 { font-size: 1.4rem; }
    .ficha-hero-img { max-height: 220px; margin-bottom: 1.25rem; }
    .ficha-mapa { height: 250px; }
    .ficha-admin-actions { width: 100%; }
    .ficha-admin-actions a, .ficha-admin-actions button { flex: 1; text-align: center; }
    .ficha-btn { flex: 1 1 100%; }
    .ficha-badges { gap: 0.4rem; }
    .badge-diet, .badge-days, .badge-hours { font-size: 0.8rem; padding: 0.35rem 0.7rem; }

    .paginacion a, .paginacion .activo {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .footer { padding: 2rem 1rem 1rem; }
    .support-logos-footer { gap: 1rem; }
    .support-logos-footer img { max-height: 38px; }
}
