/* ============================================
   CERÁMICA RUILOBA - HOJA DE ESTILOS COMPLETA
   ============================================ */

:root {
    --color-bg: #000000;
    --color-bg-alt: #0a0a0a;
    --color-bg-dark: #111111;
    --color-bg-card: #1a1a1a;
    --color-text: #e8e8e8;
    --color-text-muted: #a0a0a0;
    /* Color de realce */
    --color-accent: #bd8e8e;
    --color-accent-hover: #a15e5e;
    --color-accent-dim: rgba(189, 142, 142, 0.15);
    --color-border: #2a2a2a;

    --font-heading: 'Prociono', Georgia, serif;
    --font-body: 'Prociono', Georgia, serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --radius: 4px;
    --transition: 0.3s ease;
    --shadow-card: 0 8px 25px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.7);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* Enlaces con color de realce */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover,
a:focus {
    color: var(--color-accent-hover);
}

button { font-family: inherit; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    padding: 6px 0;
    transition: background var(--transition);
}

.header-wrapper { display: flex; justify-content: space-between; align-items: center; }

/* ===== LOGO (solo imagen, 300px) ===== */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 4px 0;
}

.logo-img {
    width: 300px;
    max-width: 40vw; /* Responsive: no exceder el 40% del ancho en móvil */
    height: auto;
    object-fit: contain;
    transition: transform var(--transition);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.logo:hover .logo-img { transform: scale(1.03); }

/* ===== NAVEGACIÓN ===== */
.nav-list { display: flex; list-style: none; gap: var(--spacing-md); align-items: center; }

.nav-list a {
    font-family: var(--font-heading);
    color: var(--color-text);
    font-weight: 400;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: var(--spacing-xs) 0;
    display: block;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a:focus::after { width: 100%; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--spacing-xs); }
.menu-toggle span { display: block; width: 25px; height: 3px; background: var(--color-text); margin: 5px 0; transition: all var(--transition); }

/* ===== SLIDER ===== */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;      /* Más alto: era 16/9 */
    max-height: 90vh;           /* Más alto: era 75vh */
    min-height: 400px;          /* Más alto: era 320px */
    overflow: hidden;
    background: var(--color-bg);
}

@media (max-width: 768px) {
    .hero { height: 80vh; aspect-ratio: auto; }
}


.slider { position: absolute; inset: 0; z-index: 0; }

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.slide.active { opacity: 1; z-index: 1; }



.slider-empty { background: url('images/taller_de_ceramica_de_ruiloba.jpg') center/cover no-repeat; }


/* ===== SECCIONES ===== */
.section { padding: var(--spacing-xl) 0; }
.section-dark { background: var(--color-bg-dark); }
.section-header { text-align: center; margin-bottom: var(--spacing-lg); }

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.section-subtitle { font-size: 1.1rem; color: var(--color-text-muted); max-width: 700px; margin: 0 auto; }
.divider { width: 80px; height: 3px; background: var(--color-accent); margin: var(--spacing-md) auto; }

/* ===== INTRODUCCIÓN ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); align-items: center; }
.about-text p { margin-bottom: var(--spacing-md); font-size: 1.05rem; line-height: 1.8; }
.about-text .lead { font-size: 1.25rem; color: var(--color-text); font-weight: 400; }
.about-text em { color: var(--color-accent); font-style: italic; }
.about-text .courses { font-weight: 600; color: var(--color-accent); }
.about-image img { border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* ===== GALERÍA ===== */
.gallery-current-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    min-height: 1.2em;
    transition: opacity 0.4s ease;
}

.gallery-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--spacing-sm); margin-bottom: var(--spacing-lg); }

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn:focus,
.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    aspect-ratio: 1;
    box-shadow: var(--shadow-card);
    transition: transform 0.5s ease, opacity 0.4s ease, box-shadow var(--transition);
    will-change: transform, opacity;
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-category { color: var(--color-text); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ===== EL TALLER ===== */
.workshop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
.workshop-images { display: flex; flex-direction: column; gap: var(--spacing-md); }
.workshop-img-main, .workshop-img-secondary { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.workshop-info h3 { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: var(--spacing-md); color: var(--color-accent); }
.workshop-info p { margin-bottom: var(--spacing-md); line-height: 1.8; }
.workshop-info strong { color: var(--color-text); }

/* ===== FORMULARIO ===== */
.contact-form { margin-top: var(--spacing-md); }
.form-group { margin-bottom: var(--spacing-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-sm); }

.form-group label { display: block; margin-bottom: var(--spacing-xs); font-weight: 600; font-size: 0.9rem; color: var(--color-text-muted); }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:hover,
.btn:focus {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(189, 142, 142, 0.3);
    color: var(--color-bg);
}

.btn-submit { width: 100%; margin-top: var(--spacing-sm); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-outline { background: transparent; border: 2px solid var(--color-accent); color: var(--color-accent); }
.btn-outline:hover,
.btn-outline:focus { background: var(--color-accent); color: var(--color-bg); }

/* ===== NOTICIAS ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.news-card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

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

.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img { transform: scale(1.05); }

.news-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.news-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
    flex-grow: 1;
}

.news-link {
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    align-self: flex-start;
}

.news-link:hover,
.news-link:focus { color: var(--color-accent-hover); }

/* ===== FOOTER ===== */
.footer {
    background: var(--color-bg-dark);
    padding: var(--spacing-lg) 0 var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: var(--spacing-xs);
    display: inline-block;
}

.footer-contact-list,
.footer-links-list {
    list-style: none;
}

.footer-contact-list li,
.footer-links-list li {
    margin-bottom: var(--spacing-xs);
}

.footer-contact-list a,
.footer-links-list a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-contact-list a:hover,
.footer-contact-list a:focus,
.footer-links-list a:hover,
.footer-links-list a:focus {
    color: var(--color-accent);
}

.footer-contact-list img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.98);
    padding: var(--spacing-md);
    z-index: 2000;
    border-top: 2px solid var(--color-accent);
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.cookie-banner.show { transform: translateY(0); }
.cookie-content { display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-md); }
.cookie-content p { margin: 0; color: var(--color-text); }
.cookie-actions { display: flex; gap: var(--spacing-sm); flex-shrink: 0; }

/* ===== ANIMACIONES ===== */
.fade-in { opacity: 0; animation: fadeIn 1s ease forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeIn { to { opacity: 1; } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .about-grid, .workshop-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-col h4 { display: block; }
    .footer-contact-list a { justify-content: center; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--color-bg-dark);
        border-top: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .nav.active { max-height: 500px; }
    .nav-list { flex-direction: column; padding: var(--spacing-md); gap: var(--spacing-sm); text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--spacing-sm); }
    .news-grid { grid-template-columns: 1fr; }
    .cookie-content { flex-direction: column; text-align: center; }

    .logo-img { width: 180px; }
    .header { padding: 4px 0; }
}

@media (max-width: 480px) {
    .logo-img { width: 140px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ============================================
   LIGHTBOX (visor a pantalla completa)
   Añadir este bloque al final del CSS
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-counter {
    margin-top: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3001;
    transition: color var(--transition);
}

.lightbox-close:hover,
.lightbox-close:focus { color: var(--color-accent); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    z-index: 3001;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.lightbox-nav:hover,
.lightbox-nav:focus {
    background: var(--color-accent);
    color: var(--color-bg);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 768px) {
    .lightbox-nav { padding: 0.5rem 0.7rem; font-size: 1.5rem; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 15px; font-size: 2rem; }
}

/* ===== POLÍTICA DE PRIVACIDAD EN FORMULARIO ===== */
.privacy-policy {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.privacy-text {
    margin-bottom: var(--spacing-sm);
}

.privacy-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

.privacy-text strong {
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.privacy-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.privacy-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.privacy-checkbox label {
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: 400;
}

.privacy-checkbox input[type="checkbox"]:focus + label {
    color: var(--color-accent);
}

/* Validación visual cuando no está marcado */
.privacy-checkbox input[type="checkbox"]:invalid {
    outline: 2px solid #ff4444;
}

/* ===== ENLACES DEL FOOTER BOTTOM ===== */
.footer-bottom .footer-link {
    color: var(--color-accent);
    font-weight: 600;
    transition: color var(--transition);
}

.footer-bottom .footer-link:hover,
.footer-bottom .footer-link:focus {
    color: var(--color-accent-hover);
    text-decoration: underline;
}