@import url('../variables.css');

/* =========================
RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: var(--fuente-size);
    background: var(--gris-claro);
    color: var(--texto);
    overflow-x: hidden;
}

/* =========================
CONTAINER
========================= */

.container {
    max-width: 1200px;
    margin: auto;
    padding: 30px 20px;
}

/* =========================
HEADER
========================= */

header {
    background: var(--guinda);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    border-bottom: 6px solid var(--dorado);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

header p {
    opacity: .9;
}

/* =========================
CARRUSEL
========================= */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
}

/* ---------------- CARRUSEL 3D ---------------- */
.content-all {
  margin-bottom: 120px;
  perspective: 1500px;
  position: relative;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#carousel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: 600px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: transform 0.1s linear;
}

#carousel figure {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  margin: -100px 0 0 -100px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.img-bg {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(159, 34, 65, 0.1);
  border: 2px solid rgba(201, 162, 39, 0.6);
  box-shadow: 0 0 20px rgba(159, 34, 65, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

/*Fondo de color vino*/
.img-bg:hover {
  transform: none;
  box-shadow: 0 0 35px rgba(159, 34, 65, 0.7);
}

.lightbox img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  animation: none;
  transform: none;
}

.img-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.carousel-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--guinda);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideFadeIn 1s ease-out forwards;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
LIGHTBOX
========================= */

.lightbox {

    position: fixed;

    inset: 0;

    background:
        rgba(0, 0, 0, .9);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;

    pointer-events: none;

    transition: .3s;

    z-index: 9999;

}

.lightbox.active {

    opacity: 1;
    pointer-events: auto;

}

.lightbox img {

    max-width: 85%;
    max-height: 85%;

    border-radius: 12px;

    animation: zoom .3s;

}

@keyframes zoom {

    from {

        transform: scale(.6);
        opacity: 0;

    }

    to {

        transform: scale(1);
        opacity: 1;

    }

}

/* =========================
BUSCADOR
========================= */

.search-container {

    margin: 40px 0;

}

#resultCount {

    color: var(--guinda);

    font-weight: 600;

    margin-bottom: 20px;

}

/* =========================
SERVICIOS
========================= */

.services-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fill,
            minmax(300px,
                1fr));

    gap: 25px;

}

.service-card {

    background: #fff;

    border-radius: 14px;

    padding: 20px;

    border-top: 5px solid var(--guinda);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .08);

    transition: .3s;

}

.service-card:hover {

    transform:
        translateY(-6px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .12);

}

.service-card h3 {

    font-size: 1rem;

    color: var(--guinda);

    margin-bottom: 15px;

}

.meta-info {

    display: flex;

    align-items: center;
    justify-content: center;

    height: 200px;

    background: var(--guinda);

    border-radius: 10px;

    margin-bottom: 15px;

}

.meta-info img {

    max-height: 120px;

    width: auto;

}

/* =========================
BOTONES
========================= */

.btn-cdmx,
.btn-cdmx:hover,
.btn-cdmx:focus,
.btn-cdmx:active,
.btn-cdmx:visited {
    background-color: var(--guinda) !important;
    border-color: var(--guinda) !important;
    color: #fff !important;
}

.btn-cdmx:hover {
    background-color: #D4AF37 !important;
    border-color: #a50034 !important;
    transform: translateY(-2px);
}

.btn-cerrar {

    background: #ddd;

    color: #333;

    border: none;

    padding: 10px 16px;

    border-radius: 8px;

}

/* Modal más ancho */
.modal-dialog {
    max-width: 95vw;
    width: 95vw;
}

/* Opcional: aprovechar más espacio */
.cesac-modal-content {
    width: 100%;
}

/* =========================
MODAL
========================= */

.modal {

    overflow: hidden;

}

.modal-body {

    max-height: 75vh;
    overflow-y: auto;

}

.cesac-modal-content {

    border: none;

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .25);

}

.cesac-modal-header {

    background:
        linear-gradient(135deg,
            #851c3e,
            #a52a4f);

    color: white;

    border-bottom:
        4px solid var(--dorado);

}

.cesac-modal-body {

    background: #f7f7f7;

    padding: 22px;

}

.cesac-grid {

    display: grid;

    grid-template-columns:
        2fr 1fr;

    gap: 20px;

}

.cesac-box {

    background: #fff;

    padding: 15px;

    border-radius: 10px;

    border: 1px solid #eee;

}

.cesac-card {

    background: #fff6f8;

    padding: 12px;

    margin-bottom: 10px;

    border-left:
        4px solid var(--guinda);

    border-radius: 8px;

}

.cesac-highlight {

    background: #fff6f8;

    padding: 12px;

    margin-top: 10px;

    border-left:
        4px solid var(--guinda);

    border-radius: 8px;

}

details {

    background: #f2f2f2;

    padding: 10px;

    border-radius: 8px;

    margin-bottom: 10px;

}

details[open] {

    background: #fff;

}

.cesac-close {

    background:
        rgba(255,
            255,
            255,
            .15);

    border: none;

    width: 35px;
    height: 35px;

    color: white;

    border-radius: 8px;

    cursor: pointer;

}

.cesac-print-btn {

    background:
        linear-gradient(135deg,
            #851c3e,
            #a52a4f);

    border: none;

    color: white;

    padding: 10px 18px;

    border-radius: 10px;

    cursor: pointer;

    font-weight: 600;

}

/* =========================
RESPONSIVE
========================= */

@media(max-width:768px) {

    .content-all {

        height: 300px;

        margin-bottom: 70px;

    }

    #carousel figure {

        width: 140px;
        height: 140px;

        margin: -70px 0 0 -70px;

    }

    .carousel-title {

        font-size: 1.2rem;

    }

    .services-grid {

        grid-template-columns: 1fr;

    }

    .cesac-grid {

        grid-template-columns: 1fr;

    }

    .meta-info {

        height: 150px;

    }

    .meta-info img {

        max-height: 90px;

    }

}