/**
 * Estilos principales - La Nube de Bilbao
 * Responsive design con Mobile First
 */

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ff6b35;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ========================================
   HEADER
   ======================================== */
.header-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 768px) {
    .header-image {
        height: 400px;
    }
}

@media (min-width: 1200px) {
    .header-image {
        height: 500px;
    }
}

/* ========================================
   BUSCADOR
   ======================================== */
.search-section {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    padding: 3rem 1rem;
    color: white;
    text-align: center;
}

.search-box {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 0 auto;
}

.search-box h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.search-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .search-form {
        grid-template-columns: repeat(3, 1fr) auto;
    }
}

.search-form input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

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

.btn-secondary:hover {
    background: #e55a28;
}

/* ========================================
   BANNERS
   ======================================== */
.banners-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.banners-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .banners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.banner-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.banner-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* ========================================
   CONTENIDO EDITABLE
   ======================================== */
.content-section {
    padding: 3rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ========================================
   CATEGORÍAS (CIUDAD IMAGINARIA DE BILBAO)
   ======================================== */
.categorias-section {
    background: linear-gradient(135deg, #0066cc 0%, #1a8cff 50%, #e3f2fd 100%);
    padding: 4rem 1rem;
    position: relative;
    overflow: hidden;
}

.categorias-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,170.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.categorias-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.categorias-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .categorias-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .categorias-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.categoria-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.categoria-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,102,204,0.1), rgba(255,107,53,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.categoria-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 12px 36px rgba(0,102,204,0.3);
}

.categoria-card:hover::before {
    opacity: 1;
}

.categoria-imagen {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.categoria-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.categoria-card:hover .categoria-imagen img {
    transform: scale(1.1);
}

.categoria-imagen i {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.categoria-info {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.categoria-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.categoria-card:hover h3 {
    color: var(--secondary-color);
}

.categoria-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Animación de entrada para categorías */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.categoria-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.categoria-card:nth-child(1) { animation-delay: 0.1s; }
.categoria-card:nth-child(2) { animation-delay: 0.2s; }
.categoria-card:nth-child(3) { animation-delay: 0.3s; }
.categoria-card:nth-child(4) { animation-delay: 0.4s; }
.categoria-card:nth-child(5) { animation-delay: 0.5s; }
.categoria-card:nth-child(6) { animation-delay: 0.6s; }
.categoria-card:nth-child(7) { animation-delay: 0.7s; }
.categoria-card:nth-child(8) { animation-delay: 0.8s; }
.categoria-card:nth-child(9) { animation-delay: 0.9s; }
.categoria-card:nth-child(10) { animation-delay: 1s; }
.categoria-card:nth-child(11) { animation-delay: 1.1s; }
.categoria-card:nth-child(12) { animation-delay: 1.2s; }

/* ========================================
   FICHAS
   ======================================== */
.fichas-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.fichas-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .fichas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fichas-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ficha-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.ficha-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ficha-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.ficha-card p {
    margin-bottom: 0.5rem;
    color: #555;
}

.ficha-card .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ========================================
   DETALLE DE FICHA
   ======================================== */
.ficha-detail {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.ficha-detail h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.info-item {
    display: flex;
    align-items: start;
    padding: 0.75rem;
    background: var(--light-color);
    border-radius: 5px;
}

.info-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.ficha-gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-top: 2rem;
}

.ficha-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.ficha-gallery img:hover {
    transform: scale(1.05);
}

/* ========================================
   BOTÓN WHATSAPP FLOTANTE
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background: #1faa52;
    transform: scale(1.1);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 1rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ccc;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #555;
    color: #999;
}

/* ========================================
   RECOMENDAMOS
   ======================================== */
.recomendamos-icon {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 1rem 0.5rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.recomendamos-icon:hover {
    padding-left: 1rem;
}

.recomendamos-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.recomendamos-modal.active {
    display: flex;
}

.recomendamos-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.recomendamos-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.recomendamos-list {
    list-style: none;
}

.recomendamos-list li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.recomendamos-list a {
    color: var(--dark-color);
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: var(--dark-color);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
