/* HERO PINTURA */
.painting-hero {
    background: linear-gradient(135deg, #b02424 0%, #8b1c1c 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.painting-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.painting-hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.painting-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.painting-subtitle {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
}

.painting-description {
    font-size: 1.1rem;
    opacity: 0.85;
}

/* GALERÍA */
.gallery-section {
    background-color: #f5f5f5;
    padding: 5rem 2rem;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.painting-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.painting-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(176, 36, 36, 0.2);
}

.painting-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #000;
}

.painting-image {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* ← NUEVO: cubre todo el contenedor */
    object-position: center;  /* ← NUEVO: centra la imagen */
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.painting-card:hover .painting-image {
    transform: scale(1.05);
    opacity: 0.8;
}

.painting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(176, 36, 36, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.painting-card:hover .painting-overlay {
    opacity: 1;
}

.painting-overlay i {
    font-size: 3rem;
}

.painting-overlay span {
    font-size: 1.2rem;
    font-weight: 600;
}

.painting-info {
    padding: 1.5rem;
    text-align: center;
}

.painting-name {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.painting-artist {
    font-size: 1rem;
    color: #b02424;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.painting-year {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    max-width: 1400px;
    border-radius: 12px;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #b02424;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: #8b1c1c;
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
}

.modal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modal-painting-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.modal-painting-artist {
    font-size: 1.3rem;
    color: #b02424;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.modal-painting-year {
    font-size: 1rem;
    color: #999;
    font-style: italic;
}

.modal-main-image {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.modal-columns {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

/* COLUMNA AUTOR */
.author-column {
    background-color: #fef9f5;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #b02424;
}

.author-photo {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.author-title {
    font-size: 1.3rem;
    color: #b02424;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

.author-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

.author-bio p {
    margin-bottom: 1rem;
}

/* COLUMNA COMENTARIO */
.commentary-column {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.commentary-section {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #b02424;
}

.commentary-title {
    font-size: 1.8rem;
    color: #b02424;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.commentary-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.commentary-text p {
    margin-bottom: 1.2rem;
}

.commentary-text em {
    font-style: italic;
    color: #666;
}

.commentary-text strong {
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   RESPONSIVE DESIGN - PINTURA
   ========================================================================== */

/* TABLET - 1024px
   ========================================================================== */
@media (max-width: 1024px) {
    .painting-hero {
        padding: 3.5rem 2rem;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .painting-image-wrapper {
        height: 350px;
    }

    .modal-columns {
        grid-template-columns: 1fr;
    }

    .author-column {
        order: 2;
    }

    .commentary-column {
        order: 1;
    }
}

/* MÓVIL GRANDE - 768px
   ========================================================================== */
@media (max-width: 768px) {
    .painting-hero {
        padding: 3rem 1.5rem;
    }

    .painting-hero-title {
        font-size: 2.5rem;
    }

    .painting-subtitle {
        font-size: 1.2rem;
    }

    .painting-description {
        font-size: 1rem;
    }

    .gallery-section {
        padding: 3rem 1.5rem;
    }

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .painting-image-wrapper {
        height: 350px;
    }

    .painting-info {
        padding: 1.3rem;
    }

    .painting-name {
        font-size: 1.3rem;
    }

    .modal-content {
        margin: 1rem;
        border-radius: 8px;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .modal-header {
        margin-bottom: 2rem;
    }

    .modal-painting-title {
        font-size: 2rem;
    }

    .modal-painting-artist {
        font-size: 1.2rem;
    }

    .modal-main-image {
        max-height: 400px;
        margin-bottom: 2rem;
    }

    .modal-columns {
        gap: 2rem;
    }

    .author-column {
        padding: 1.5rem;
    }

    .author-photo {
        height: 200px;
    }

    .author-title {
        font-size: 1.2rem;
    }

    .author-bio {
        font-size: 0.9rem;
    }

    .commentary-section {
        padding: 1.5rem;
    }

    .commentary-title {
        font-size: 1.5rem;
    }

    .commentary-text {
        font-size: 1rem;
    }
}

/* MÓVIL PEQUEÑO - 640px
   ========================================================================== */
@media (max-width: 640px) {
    .painting-hero {
        padding: 2.5rem 1rem;
    }

    .painting-hero-title {
        font-size: 2rem;
    }

    .painting-subtitle {
        font-size: 1.1rem;
    }

    .painting-description {
        font-size: 0.95rem;
    }

    .gallery-section {
        padding: 2.5rem 1rem;
    }

    .gallery-container {
        gap: 1.5rem;
    }

    .painting-image-wrapper {
        height: 300px;
    }

    .painting-overlay i {
        font-size: 2.5rem;
    }

    .painting-overlay span {
        font-size: 1.1rem;
    }

    .painting-info {
        padding: 1.2rem;
    }

    .painting-name {
        font-size: 1.2rem;
    }

    .painting-artist {
        font-size: 0.95rem;
    }

    .painting-year {
        font-size: 0.85rem;
    }

    .modal-content {
        margin: 0.5rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .modal-body {
        padding: 1.5rem 1rem;
    }

    .modal-header {
        margin-bottom: 1.5rem;
    }

    .modal-painting-title {
        font-size: 1.7rem;
    }

    .modal-painting-artist {
        font-size: 1.1rem;
    }

    .modal-painting-year {
        font-size: 0.95rem;
    }

    .modal-main-image {
        max-height: 350px;
        margin-bottom: 1.5rem;
    }

    .modal-columns {
        gap: 1.5rem;
    }

    .author-column {
        padding: 1.2rem;
    }

    .author-photo {
        height: 180px;
        margin-bottom: 1.2rem;
    }

    .author-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .author-bio {
        font-size: 0.85rem;
    }

    .commentary-section {
        padding: 1.2rem;
    }

    .commentary-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .commentary-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .commentary-text p {
        margin-bottom: 1rem;
    }
}