* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #130505;
    color: #f4f4f4;
}

a {
    color: #f5d38b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
}

.logo-img {
    max-width: 100px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}


.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo span {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 14px;
}

.main-nav a {
    margin-left: 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Buttons */

.btn-primary,
.btn-secondary,
.btn-link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f5d38b, #c68f3c);
    color: #1a1308;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #f5d38b;
    color: #f5d38b;
}

.btn-link {
    color: #f5d38b;
    padding: 0;
}

/* Sections */

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
}

.events-slider,
.gallery-preview,
.cta-recorrido,
.home-contact,
.cartelera,
.evento-detalle,
.recorrido-360,
.patronato,
.contacto {
    padding: 40px 0;
}

/* Cards */

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card-event {
    background: #151520;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #26263a;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.card-event-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.card-event-image.placeholder {
    background: #202033;
}

.card-event-body {
    padding: 14px 16px 16px;
}

.card-event-body h3 {
    margin-top: 0;
    margin-bottom: 4px;
}

.event-date {
    font-size: 13px;
    color: #b0b0c5;
}

.event-short {
    font-size: 14px;
    margin: 8px 0 12px;
}

.card-event-full {
    margin-bottom: 16px;
}

.cards-column {
    display: flex;
    flex-direction: column;
}

/* Gallery */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #26263a;
}

/* CTA */

.cta-recorrido {
    background: linear-gradient(135deg, #202438, #101018);
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Evento detalle */

.evento-detalle-inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.evento-cover img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #26263a;
}

.event-description {
    margin: 16px 0;
    line-height: 1.6;
}

.event-actions .btn-primary {
    margin-right: 8px;
}

.event-category {
    font-size: 13px;
    color: #f5d38b;
}

/* Patronato */

.patronato-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.patronato-card {
    background: #151520;
    border: 1px solid #26263a;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.patronato-photo img {
    width: 100%;
    max-width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 999px;
    border: 2px solid #f5d38b;
    margin-bottom: 8px;
}

.patronato-role {
    font-size: 14px;
    color: #b0b0c5;
}

/* Recorrido */

.iframe-wrapper iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

/* Contacto */

.contact-form {
    max-width: 520px;
    margin-top: 16px;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row-inline {
    display: flex;
    gap: 16px;
}

.form-row-inline .form-row {
    flex: 1;
}

.form-row label {
    font-size: 14px;
    color: #c5c5d8;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="url"],
textarea {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #30304a;
    background: #0e0e19;
    color: #f4f4f4;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

.alert-success {
    background: #123821;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #2b8a3e;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Footer */

.site-footer {
    border-top: 1px solid #202030;
    padding: 16px 0;
    font-size: 13px;
    color: #c3b48a;
}

/* Admin */

.admin-body {
    background: #050509;
}

.admin-header {
    background: #121222;
    border-bottom: 1px solid #26263a;
}

.admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.admin-nav a {
    margin-left: 12px;
    font-size: 13px;
}

.admin-main {
    padding: 24px 0 40px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #26263a;
    padding: 8px;
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    color: #d0d0e0;
}

.admin-section h1 {
    margin-top: 0;
}

.admin-links li {
    margin: 6px 0;
}

/* Admin login */

.admin-login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #262945, #050509);
}

.admin-login-container {
    background: #151520;
    padding: 24px 20px 22px;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    border: 1px solid #2a2a3f;
}

.admin-login-container h1 {
    margin-top: 0;
    margin-bottom: 16px;
    text-align: center;
}

.alert-error {
    background: #3d1220;
    border: 1px solid #b72c4a;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.login-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #b0b0c5;
}

/* Misc */

.small {
    font-size: 12px;
    color: #a0a0b8;
}

/* Responsive */

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .evento-detalle-inner {
        grid-template-columns: 1fr;
    }
    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    /*.main-nav {
        display: none; 
    }
    */
}


/* =======================
   HOME ESTILO TIM
   ======================= */

/* HERO SUPERIOR */

.hero-tim {
    position: relative;
    height: 60vh;
    min-height: 360px;
    background-color: #000;
    background-image: url('/tim/public/uploads/hero-tim.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-tim-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.75));
}

.hero-tim-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 24px;
}

.hero-tim-text h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-tim-text p {
    margin-top: 4px;
    max-width: 420px;
    color: #e0e0e0;
}

/* Títulos secciones */

.home-section-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 14px;
    margin: 32px 0 24px;
    color: #c3b48a;
}

.home-section-title-gold {
    color: #f5d38b;
}

/* EVENTOS DEL MES */

.home-events {
    background: #f4f4f4;
    background-image: url('/tim/public/images/backevents.png');
    color: #222;
    padding: 132px 0 140px;
}
/* Tarjeta de evento */
.home-event-card {
    width: 30%;
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    color: #fff;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.3);
}

/* Imagen con aspecto fijo 375x180 */
.home-event-thumb {
    width: 100%;
    height: 180px; /* <-- ¡Aquí fijamos altura! */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Capa oscura para que el texto destaque */
.home-event-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
}

/* Número del evento dentro de la imagen */
.home-event-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.6);
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
    color: #d4af37; /* Dorado TIM */
    z-index: 2;
}

/* Contenido dentro del recuadro */
.home-event-info {
    padding: 15px;
}

/* Título */
.home-event-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 6px 0;
    color: #fff;
}

/* Fecha */
.home-event-date {
    font-size: 14px;
    color: #c8c8c8;
    margin-bottom: 12px;
}

/* Link */
.home-event-link {
    font-size: 14px;
    color: #d4af37;
    text-decoration: none;
    font-weight: bold;
}

.home-event-link:hover {
    color: #fff;
}

.home-event-info {
    padding: 15px;
}
.home-event-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 3;
    color: #fff;
    text-shadow: 0 0 6px rgba(0,0,0,0.9);
}

.home-events-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.home-events-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}



/* Botón outline dorado */

.btn-outline-gold {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid #847149;
    color: #847149;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
}

/* EL TEATRO */

.home-theatre {
    background: #000;
    padding: 100px 0 140px;
}

.home-theatre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.home-theatre-item {
    background: #1c1513;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #3a2a21;
}

.home-theatre-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.home-theatre-item.placeholder {
    height: 180px;
    background: #222;
}

/* BARRA DE CONTACTO */

.home-contact-bar {
    background: #272727;
    padding: 18px 0;
        padding: 132px 0 140px;

}

.home-contact-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.home-contact-text {
    margin: 0;
    font-size: 14px;
}

/* Responsivo */

@media (max-width: 768px) {
    .hero-tim {
        height: 45vh;
        min-height: 260px;
    }
    .home-contact-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}


.home-gallery {
    padding: 50px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  grid-auto-rows: 120px 260px;
  grid-gap: 10px;
  grid-auto-flow: dense;
}

.gallery-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-item .image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-item .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  cursor: pointer;
  transition:.5s ease-in-out;
}

.gallery-item:hover .image img {
  transform: scale(1.4);
}

.gallery-item .text {
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 20px;
  pointer-events: none;
  z-index: 4;
  transition: .3s ease-in-out;
  backdrop-filter: blur(6px) saturate(1.6);
  padding: 0.4em 1em;
  border-radius: 6px;
}

.gallery-item:hover .text {
  opacity: 1;
}

/* Grid spans */
.w-1{ grid-column: span 1; }
.w-2{ grid-column: span 2; }
.w-3{ grid-column: span 3; }
.w-4{ grid-column: span 4; }
.w-5{ grid-column: span 5; }
.w-6{ grid-column: span 6; }

.h-1{ grid-row: span 1; }
.h-2{ grid-row: span 2; }
.h-3{ grid-row: span 3; }

@media screen and (max-width: 600px){
  .gallery-grid {
      grid-template-columns: repeat(2,1fr);
      grid-auto-rows: 120px;
  }

  .w-1,.w-2,.w-3,.w-4,.w-5,.w-6 {
      grid-column: span 2;
  }

  .h-1,.h-2,.h-3{
      grid-row: span 2;
  }
}


.admin-page h1 {
    margin-bottom: 10px;
}

.form-gallery-upload {
    margin-bottom: 20px;
}

.form-gallery-upload .form-row {
    margin-bottom: 12px;
}

.admin-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-gallery-item {
    width: 180px;
    font-size: 13px;
}

.admin-gallery-item img {
    width: 100%;
    border-radius: 6px;
    display: block;
}
