/* ===== VARIABLES IMPORT - PALETA ROJO, NEGRO, ROSA Y GRIS ===== */
:root {
    /* Paleta armonizada profesional */
    --primary-gradient: linear-gradient(135deg, #2C2C2C 0%, #3A3A3A 50%, #1A1A1A 100%);
    --secondary-gradient: linear-gradient(135deg, #E5E5E5 0%, #D0D0D0 100%);
    --accent-color: #A63D40;
    --accent-light: #D4A5A5;
    --accent-dark: #8B2E33;
    --text-primary: #FFFFFF;
    --text-dark: #2C2C2C;
    --shadow-dark: rgba(44, 44, 44, 0.6);
    --shadow-light: rgba(229, 229, 229, 0.4);
    --border-light: rgba(229, 229, 229, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    font-size: inherit;
    font-family: inherit;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    font: 16px/1.5 sans-serif;
}

.btn-group {
    text-align: center;
}

.open-modal {
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    margin-bottom: 1rem;
    border-radius: 25px;
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--shadow-dark);
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.open-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-dark);
    border-color: var(--accent-light);
    background: linear-gradient(135deg, #3A3A3A 0%, #A63D40 50%, #2C2C2C 100%);
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: all 0.35s ease-in;
    z-index: 1000;
}

.modal.is-visible {
    visibility: visible;
    opacity: 1;
}

.modal-dialog {
    position: relative;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    background: var(--secondary-gradient);
    overflow: auto;
    cursor: default;
    box-shadow: 0 10px 40px var(--shadow-dark), 0 4px 20px rgba(166, 61, 64, 0.4);
    border: 2px solid var(--border-light);
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-dialog > * {
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-gradient);
    border-radius: 18px 18px 0 0;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2, .modal-header h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-content {
    background: var(--secondary-gradient);
    padding: 2rem;
    text-align: center;
}

.modal-content h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 600;
}

.modal-image {
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: 0 8px 25px var(--shadow-dark), 0 4px 15px rgba(166, 61, 64, 0.3);
    transition: transform 0.3s ease;
    border: 2px solid var(--border-light);
}

.modal-image:hover {
    transform: scale(1.02);
    border-color: var(--accent-light);
}

.modal-header .close-modal {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(229, 229, 229, 0.2);
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(229, 229, 229, 0.3);
}

.modal-header .close-modal:hover {
    background: rgba(166, 61, 64, 0.3);
    transform: rotate(90deg);
    border-color: var(--accent-light);
}

.modal p + p {
    margin-top: 1rem;
}

.modal-footer {
    background: var(--primary-gradient);
    border-radius: 0 0 18px 18px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid var(--border-light);
}
  
  
/* ===== ANIMATIONS ===== */
[data-animation] .modal-dialog {
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-animation].is-visible .modal-dialog {
    opacity: 1;
    transition-delay: 0.2s;
}

[data-animation="slideInOutDown"] .modal-dialog {
    transform: translateY(100%);
}

[data-animation="slideInOutTop"] .modal-dialog {
    transform: translateY(-100%);
}

[data-animation="slideInOutLeft"] .modal-dialog {
    transform: translateX(-100%);
}

[data-animation="slideInOutRight"] .modal-dialog {
    transform: translateX(100%);
}

[data-animation="zoomInOut"] .modal-dialog {
    transform: scale(0.2);
}

[data-animation="rotateInOutDown"] .modal-dialog {
    transform-origin: top left;
    transform: rotate(-1turn);
}

[data-animation="mixInAnimations"].is-visible .modal-dialog {
    animation: mixInAnimations 2s 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

[data-animation="slideInOutDown"].is-visible .modal-dialog,
[data-animation="slideInOutTop"].is-visible .modal-dialog,
[data-animation="slideInOutLeft"].is-visible .modal-dialog,
[data-animation="slideInOutRight"].is-visible .modal-dialog,
[data-animation="zoomInOut"].is-visible .modal-dialog,
[data-animation="rotateInOutDown"].is-visible .modal-dialog {
    transform: none;
}

@keyframes mixInAnimations {
    0% {
        transform: translateX(-100%);
    }
    10% {
        transform: translateX(0) rotate(20deg);
    }
    20% {
        transform: rotate(-20deg);
    }
    30% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(-10deg);
    }
    70% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    90% {
        transform: rotate(2deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* ===== RESPONSIVE MODAL ===== */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 92vw;
        max-height: 85vh;
        margin: 0.5rem;
    }

    .modal-header h2, .modal-header h4 {
        font-size: 1.4rem;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-image {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .modal-dialog {
        max-width: 95vw;
        max-height: 90vh;
        border-radius: 15px;
        margin: 0.3rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2, .modal-header h4 {
        font-size: 1.2rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .modal-content h3 {
        font-size: 1rem;
        line-height: 1.4;
    }

    .modal-image {
        max-height: 45vh;
        border-radius: 10px;
    }

    .modal-footer {
        padding: 1rem;
    }

    .modal-footer button {
        font-size: 1rem;
        padding: 0.7rem 1.5rem;
    }
}

@media (max-width: 360px) {
    .modal-dialog {
        max-width: 98vw;
        max-height: 95vh;
    }

    .modal-header h2, .modal-header h4 {
        font-size: 1rem;
    }

    .modal-content h3 {
        font-size: 0.9rem;
    }

    .modal-image {
        max-height: 40vh;
    }
}

/* ===== FOOTER ===== */
.page-footer {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.page-footer span {
    color: var(--accent-color);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}