* {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}
html {
  height: 100%;
}
html,
body {
  padding: 0;
  margin: 0;
}
body {
  background: #fff;
  color: #444;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: lighter;
  margin-bottom: 1em;
}
a {
  color: #444;
  text-decoration: none;
}
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
}
.noselect {
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
#container {
  padding: 2em;
}
header {
  font-size: 1.8em;
  margin-bottom: 1.1em;
}
h1 {
  display: inline-block;
  font-weight: bold;
}
h1 a {
  color: #444;
}
footer {
  color: #666;
  font-size: 0.9em;
  font-style: italic;
  margin-top: 3em;
}
footer a {
  color: #17baef;
}
nav.breadcrumbs {
  border-bottom: 1px solid #ddd;
  font-size: 1.2em;
  margin-bottom: 2em;
  padding: 0em 0em 0.8em 0.1em;
}
#albums,
#media {
  margin: 0em;
}
#albums a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  margin-right: 2em;
  margin-bottom: 3em;
  position: relative;
  overflow: hidden;
  width: 300px;
  height: 220px;
  background-size: cover;
  border-radius: 8px;
}
#albums .info {
  position: absolute;
  padding: 1em;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.9em;
  line-height: 1.2em;
  margin: 0;
  width: 100%;
  font-weight: bold;
  bottom: 0;
}
#albums h3 {
  font-size: 1.3em;
  margin-bottom: 0.2em;
}
#media li {
  float: left;
  margin-right: 0.4em;
  margin-bottom: 0.2em;
  position: relative;
  cursor: zoom-in;
}
#media a {
  display: inline-block;
}
#media img {
  border-radius: 8px;
  display: block;
}
#media li .video-overlay {
  left: 50%;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  position: absolute;
  top: 50%;
  width: 48px;
}
@media only screen and (max-width: 360px) {
  #albums a {
    width: 100%;
    height: 190px;
  }
}
nav.pagination {
  color: #666;
  display: inline-block;
  font-size: 1em;
  margin-top: 2em;
  padding: 0em 0em 0.5em 0em;
}
nav.pagination .page {
  margin-right: 0.2em;
}
nav.pagination .page.current {
  font-weight: bold;
}
nav.pagination a {
  color: #666;
}
#zip {
  color: #666;
  margin-bottom: 2em;
}
#zip a {
  color: #3399ff;
}
/* === IDENTIDAD CORPORATIVA + ÁLBUMES Y FOTOS PERFECTOS (PC Y MÓVIL) === */

/* 1. LIMPIEZA GENERAL */
body {
    background-color: #f5f5f5 !important;
    color: #4a4a4a;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}
ul { padding-left: 0 !important; margin-left: 0 !important; }

/* 2. HEADER */
header, .layout-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%) !important;
    border-bottom: 4px solid #c41e3a;
    padding: 15px 0;
    width: 100% !important;
}

/* 3. LOGO Y TÍTULO */
h1 a, .page-header h1 a {
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
h1 a::before {
    content: "";
    display: inline-block;
    width: 50px;
    height: 50px;
    background-image: url('https://raw.githubusercontent.com/marcosite08/elparaiso-galeria/master/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 15px;
}

/* 4. MIGAS DE PAN */
.breadcrumbs { color: #777777 !important; font-weight: normal; }
.breadcrumbs a { color: #333333 !important; font-weight: 600; text-decoration: none; }
.breadcrumbs a:hover { color: #c41e3a !important; text-decoration: underline; }

/* 5. TARJETAS (ESTILO VISUAL) */
.album .photo { border: 1px solid #e0e0e0 !important; }
.album .name { background: rgba(0, 0, 0, 0.9) !important; color: white !important; }

/* 6. BOTÓN ZIP */
:has(> a[href$=".zip"]) { font-size: 0 !important; color: transparent !important; }
a[href$=".zip"] { font-size: 0 !important; text-decoration: none !important; }
a[href$=".zip"]::after {
    content: "📥 Descargar catálogo completo (ZIP)";
    font-size: 15px !important;
    font-weight: bold;
    color: white !important;
    background-color: #c41e3a;
    padding: 12px 25px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 15px;
    visibility: visible !important;
}

/* 7. FOOTER */
footer {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-top: 4px solid #c41e3a;
    padding: 20px 0;
    width: 100% !important;
}
footer a, footer p { color: #ffffff !important; opacity: 1 !important; }

/* =========================================================
   8. ZONA MÓVIL (¡AQUÍ AGREGUÉ LOS ÁLBUMES!)
   ========================================================= */
@media screen and (max-width: 768px) {
    #container, .container, main, .content { 
        padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; 
    }

    /* APLICAMOS GRID A LAS FOTOS (#media) Y A LOS ÁLBUMES (#albums) */
    #media, #albums { 
        display: grid !important; 
        grid-template-columns: 1fr 1fr !important; /* 2 columnas */
        gap: 6px !important; 
        padding: 4px !important; 
        margin: 0 !important; 
        width: 100% !important; 
        box-sizing: border-box !important; 
    }

    /* Que las tarjetas ocupen toda la celda */
    #media li, #albums a { 
        width: 100% !important; 
        margin: 0 !important; 
        padding: 0 !important; 
        box-sizing: border-box !important;
        display: block !important;
    }

    /* Ajuste de imágenes */
    #media li a, #media li img, .album .photo { width: 100% !important; height: auto !important; display: block; }
    h1, .breadcrumbs { padding-left: 10px !important; padding-right: 10px !important; }
}

/* =========================================================
   9. ZONA ESCRITORIO (LA SOLUCIÓN DE LA OTRA IA + MI TOQUE)
   ========================================================= */
@media screen and (min-width: 769px) {
    
    #container {
        width: 98% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* AQUÍ ESTÁ LA CLAVE: #albums y #media con FLEXBOX */
    #media, #albums {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important; /* Centrados */
        gap: 20px !important;
    }
    
    /* Para que las carpetas no se vean muy flacas en PC */
    #albums a {
        min-width: 300px;
    }
}
