/* ======================================================
   VARIABLES GLOBALES
   ====================================================== */
:root {
    --background-light: #f9f9f9;
    --primary-color: #2563eb;
    --secondary-color: #94a3b8;
    --text-dark: #1f2937;
    --border-radius: 12px;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}



body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #f4f6f8;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-dark);
}

/* ======================================================
   LAYOUT PRINCIPAL (ASIDE + CONTENIDO)
   ====================================================== */
.donar-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 980px) {
    .donar-layout {
        flex-direction: column;
        padding: 1rem;
    }
}

/* ======================================================
   ASIDE DE FOTOS
   ====================================================== */
/* ===========================
   ASIDE DE FOTOS (Elegante)
=========================== */
.photo-aside {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 18px;
    position: sticky;
    top: 110px;
    height: fit-content;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.photo-aside:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.photo-aside h3 {
    text-align: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

/* ===========================
   LISTA DE FOTOS
=========================== */
.photo-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 8px;
    scroll-behavior: smooth;
}

/* Scrollbar Minimalista */
.photo-list::-webkit-scrollbar {
    width: 8px;
}

.photo-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d0d8e4, #b4c1d1);
    border-radius: 10px;
}

.photo-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bfc8d6, #a6b2c2);
}

/* ===========================
   IMÁGENES
=========================== */
.photo-list img {
    width: 100%;
    height: 165px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    cursor: pointer;
}

.photo-list img:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    filter: brightness(1.05) saturate(1.1);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
    .photo-aside {
        width: 100%;
        position: static;
        margin-bottom: 20px;
        padding: 14px;
        border-radius: 14px;
    }
}


/* ======================================================
   CONTENIDO PRINCIPAL
   ====================================================== */
.donar-container {
    margin-top: 10px;
    flex: 1;
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.donar-container h2 {
    color: var(--primary-color);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    background: rgba(37, 99, 235, 0.08);
    padding: .7rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    margin: 1rem auto 1.5rem;
    width: fit-content;
    transition: .3s;
}

.subtitle:hover {
    background: rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}

.donar-intro {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ======================================================
   MENSAJES
   ====================================================== */
.donar-mensajes {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.donar-mensaje {
    width: 240px;
    text-align: center;
}

.donar-img {
    width: 210px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: 0.3s;
    cursor: pointer;
}

.donar-img:hover {
    transform: scale(1.05);
    box-shadow: var(--hover-shadow);
}

/* ======================================================
   PANEL DE OPCIONES
   ====================================================== */
.donar-panel {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.donar-opcion {
    padding: 1rem 1.5rem;
    min-width: 130px;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.donar-opcion.active,
.donar-opcion:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-4px);
}

.donar-opcion i {
    font-size: 1.7rem;
    margin-bottom: 5px;
    display: block;
}

/* ======================================================
   FORMULARIOS
   ====================================================== */
.donar-campos {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.donar-campos.show {
    display: flex;
    height: 10%;
    
}

.donar-campo input,
.donar-campo textarea,
.donar-campo select {
    width: 100%;
    
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
    font-size: 1rem;
    transition: 0.3s;
}

.donar-campo input:focus,
.donar-campo textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* ======================================================
   MÉTODOS DE PAGO
   ====================================================== */
.metodo {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 12px;
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    transition: .3s;
}

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

/* ======================================================
   PREVIEW DE IMÁGENES
   ====================================================== */
.preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-container img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ======================================================
   BOTÓN FINAL
   ====================================================== */
.botondonar {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    border-radius: 12px;
    border: none;
    color: white;
    font-size: 1.1rem;

    font-weight: 700;
    transition: .3s;
    cursor: pointer;
}

.botondonar:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1e40af, var(--primary-color));
}

/* ======================================================
   UTILITY
   ====================================================== */
.hidden {
    display: none !important;
}


/* para la targeta  */
@import url("https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i");
@import url("https://fonts.googleapis.com/css?family=Overpass+Mono");

:root {
  --purple: #892a92;
  --purple2: #70217a;
  --white: #f6d3fd;
  --height: 222px;
  --width: 350px;
  --font: "Overpass Mono", monospaced;
  --masterFont: "Raleway", sans-serif;
}

.card {
  --heightCalc: -calc((var(--height) / 2) - 10px);
  --widthCalc: calc(var(--width) / 2);
  height: var(--height);
  width: var(--width);
  min-width: var(--width);
  background: linear-gradient(90deg, var(--purple), var(--purple2));
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  margin: 10px auto;
  position: relative;
  filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.6));
  transform: translateY(calc(10% - 10px));
}

.card__figure {
  position: relative;
  height: 40px;
  margin: 0;
}

.card__figure::after {
  content: "PLATINUM";
  font-size: 0.45em;
  letter-spacing: 4px;
  color: var(--white);
  position: absolute;
  width: 100%;
  text-align: center;
  bottom: calc(-100% - 15px);
}

.card__figure--logo {
  --widthLogo: 90px;
  width: var(--widthLogo);
  position: absolute;
  right: 50%;
  transform: translate(calc(var(--widthLogo) / 2), 20px);
}

.card__reader {
  width: 50px;
  height: 40px;
  background: radial-gradient(#d9a56c, #b18457);
  border-radius: 5px;
  position: absolute;
  top: 50%;
  transform: translate(33px, -40px);
  overflow: hidden;
}

.card__reader--risk {
  width: 50px;
  height: 40px;
  border-radius: 13px;
  background: transparent;
  border: 1px solid #666;
  position: absolute;
  z-index: 0;
}

.card__reader--risk-one {
  transform: translate(37px, 15px);
}

.card__reader--risk-two {
  transform: translate(15px, 30px);
}

.card__reader--risk-three {
  transform: translate(-37px, -15px);
}

.card__reader--risk-four {
  transform: translate(-15px, -30px);
}

.card__number {
  font-family: var(--font);
  font-size: 1.15em;
  font-weight: normal;
  color: var(--white);
  letter-spacing: 2.5px;
  text-align: center;
  margin-left: -90px;
  margin-top: 80px;
  z-index: 1;
  position: relative;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.card__number::before,
.card__number::after {
  font-family: Arial;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.4em;
  position: absolute;
  letter-spacing: 0px;
}

.card__number::before {
  content: "5032";
  transform: translate(15px, 22px);
}

.card__number::after {
  content: "Valid thru";
  width: 80px;
  transform: translate(-215px, 22px);
}

.card__dates {
  position: absolute;
  width: 40%;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  color: var(--white);
  font-family: var(--font);
  bottom: 22%;
  transform: translate(60px, 0px);
}

.card__dates span {
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.card__name {
  font-family: var(--font);
  font-size: 0.9em;
  font-weight: normal;
  color: var(--white);
  letter-spacing: 2.5px;
  transform: translate(35px, 25px);
  position: relative;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.card__flag {
  right: 30px;
  top: 45%;
  border-radius: 25px;
  transform: translate(0, -28px);
  position: absolute;
  height: 110px;
  width: 80px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.card__flag--globe {
  --margin: 5px;
  width: calc(100% - (var(--margin) * 2));
  background-color: #b7b2b8;
  height: 50%;
  border-radius: 20px;
  margin: var(--margin);
  background: repeating-linear-gradient(
    0deg,
    #dbd1dc,
    #dbd1dc 5px,
    #b2aab5 7px,
    #b2aab5 5px
  );
}

.card__flag--globe::after,
.card__flag--globe::before {
  content: "\f0ac";
  font-family: FontAwesome;
  color: rgba(0, 0, 0, 0.2);
  font-size: 3em;
  top: 6px;
  left: 2px;
  position: absolute;
}

.card__flag--globe::after {
  transform: translateX(10px);
}

.card__flag--globe::before {
  transform: translateX(25px);
}

.card__flag--red {
  position: absolute;
  left: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ce0e1d;
}

.card__flag--yellow {
  position: absolute;
  right: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e39833;
}

.card__flag--yellow::after {
  content: "MasterCard";
  position: absolute;
  font-size: 0.7em;
  top: 50%;
  transform: translate(-25px, -7px);
  font-family: var(--masterFont);
  font-style: italic;
  font-weight: 800;
  color: var(--white);
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.assign {
  text-align: center;
  font-family: var(--masterFont);
  color: #fff;
  font-size: 0.8em;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.assign a {
  text-decoration: none;
  font-weight: 700;
  color: #fff;
}

.assign a::hover {
  color: var(--purple);
}


/* mensaje de donacion */

/* Estilos para el Mensaje de Donación (Éxito o Error) */

.mensaje-exito, .mensaje-error {
    display: none; /* Oculto por defecto */
    position: fixed; /* Fijo en la pantalla */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.mensaje-exito {
    background-color: #e6f7ee; /* Fondo verde claro */
    color: #00704a; /* Texto verde oscuro */
    border: 1px solid #00704a;
}

.mensaje-exito .fa-circle-check {
    color: #00704a;
    font-size: 24px;
}

/* Estilos para el mensaje de Error (opcional, pero útil) */
.mensaje-error {
    background-color: #fcebeb; /* Fondo rojo claro */
    color: #cc0000; /* Texto rojo oscuro */
    border: 1px solid #cc0000;
}

.mensaje-error .fa-circle-xmark {
    color: #cc0000;
    font-size: 24px;
}

/* Estado que muestra el mensaje (se añade con PHP) */
.mensaje-exito.show, .mensaje-error.show {
    display: flex; /* Mostrar el contenedor */
    opacity: 1; /* Hacerlo visible */
}

/* Botón para cerrar */
.cerrar-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    color: inherit; /* Hereda el color del texto (verde/rojo) */
}

.cerrar-btn:hover {
    opacity: 0.7;
}



    /* ======================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ====================================================== */

@media (max-width: 980px) {
    /* 1. Cambio de Layout: de horizontal a vertical */
    .donar-layout {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
       
    }

    /* 2. Transformación del Aside en Carrusel Horizontal */
    .photo-aside {
        width: 100%;
        position: static; /* Quita el sticky en móvil */
        padding: 15px;
        box-sizing: border-box;
    }

    .photo-list {
        flex-direction: row; /* Alineación horizontal */
        overflow-x: auto;    /* Scroll horizontal */
        overflow-y: hidden;
        gap: 12px;
        padding-bottom: 12px; /* Espacio para el scrollbar */
        scroll-snap-type: x mandatory; /* Efecto de imán al deslizar */
        -webkit-overflow-scrolling: touch;
        padding-top: 40px;
    }

    .photo-list img {
        width: 180px;      /* Tamaño fijo para las fotos del carrusel */
        height: 140px;
        flex-shrink: 0;    /* Evita que las fotos se aplasten */
        scroll-snap-align: start;
    }

    /* 3. Ajuste de Contenedor Principal */
    .donar-container {
        margin-top: -20px;
        padding: 1.5rem;
    }

    /* 4. Grid de Mensajes (Donar Alimento/Ropa) */
    .donar-mensajes {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }

    .donar-mensaje {
        width: 100%;
    }

    .donar-img {
        max-width: 100%;
       max-height: 200px;
    }

      .donar-campo input{
        width: 95%;
      }
}

@media (max-width: 600px) {
    /* 5. Ajuste de la Tarjeta de Crédito para que no se desborde */
    .card {
        transform: scale(0.8); /* Escala la tarjeta al 80% */
        margin: -1px auto;    /* Compensa el espacio del escalado */
    }

    /* 6. Botones de opciones (Dinero, Alimento, etc) */
    .donar-panel {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 columnas */
        gap: 0.8rem;
    }

    .donar-opcion {
        min-width: 0;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .donar-container h2 {
        font-size: 1.5rem;
    }
}