/* -------------------------------------------------------------------------- */
/* Artworks Page Specific Styles - Grid Layout, Cards, and Collapsible Text   */
/* -------------------------------------------------------------------------- */

/* --- Layout Variables (Ensure compatibility with styles.css) --- */
:root {
    --primary-color: #333;
    --secondary-color: #f4f4f4;
    --accent-color: #a04040;
    --max-content-width: 1400px;
}
a {
color:green;
}
.artworks-container h2{
    color:#666;
}
/* --- Main Container for Centering and Max Width --- */
.artworks-container {
    max-width: var(--max-content-width);
    margin: 4rem auto;
    padding: 0 1.5rem; /* Padding for small screens */
}

/* --- The Responsive Artwork Grid --- */
.artworks-grid {
    display: grid;
    gap: 2rem; /* Spacing between cards */
    
    /* Default: 4 columns for large desktop view */
    grid-template-columns: repeat(4, 1fr);
}

/* --- Responsive Grid Adjustments (3 to 1 columns) --- */

/* Tablet/Small Desktop (up to 1200px): 3 columns */
@media (max-width: 1200px) {
    .artworks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Portrait/Large Mobile (up to 900px): 2 columns */
@media (max-width: 900px) {
    .artworks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (up to 600px): 1 column */
@media (max-width: 600px) {
    .artworks-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Artwork Card Styling --- */

.artwork-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); /* Soft shadow for depth */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}


.artwork-card:hover {
    transform: translateY(-5px); /* Subtle lift on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.artwork-image-container {
    width: 100%;
    padding-top: 100%; /* Creates a perfect square for the image area */
    position: relative;
}

.artwork-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;  /* Ensures image covers the space _contain, cover, */
    transition: opacity 0.3s;
}

.artwork-details {
    padding: 1rem 1rem 1.5rem 1rem;
    flex-grow: 1; /* Ensures all cards stretch vertically if needed */
}

.artwork-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 0.75rem;
}

/* Description List (standard fields) */
.artwork-description-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    font-size: 0.88rem;
}

.artwork-description-list li {
    line-height: 1.6;
}

.artwork-description-list strong {
    font-weight: 600;
    color: #666;
    display: inline-block;
    min-width: 70px; /* Aligns description values neatly */
}
/* --- Collapsible Text Functionality --- */

.artwork-text-expanded {
    overflow: hidden;
    max-height: 0; /* Initially hidden/collapsed */
    /* Smooth transition for the expanding/collapsing effect */
    transition: max-height 0.5s ease-in-out, padding-top 0.5s ease;
}

.artwork-text-expanded.expanded {
    max-height: 1000px; /* Max height large enough to show any expected text */
    padding-top: 1rem;
}

.artwork-text-expanded p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #444;
}
.artwork-text-expanded a {
	font-weight:bold;
	color:#a34040;
}
.artwork-text-expanded a:hover {
	color:inherit;
}
.read-more-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: underline;
    padding: 0;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.read-more-btn:hover {
    color: var(--primary-color);
}

/* 1. Make the thumbnail look clickable */
.artwork-image-container img {
    cursor: zoom-in;
    transition: transform 0.2s ease; /* Optional: subtle hover effect */
}

/* Optional: Slight zoom on hover for the thumbnail */
.artwork-image-container img:hover {
    transform: scale(1.02);
}

/* 2. The Pop-up Window (Dialog) styling */
dialog#artwork-dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    background: transparent; /* Allows the image to stand out */
    max-width: 90vw; /* 90% of viewport width */
    max-height: 90vh; /* 90% of viewport height */
    overflow: visible; 
}

/* 3. The Dark Background behind the pop-up */
dialog#artwork-dialog::backdrop {
    background: rgba(0, 0, 0, 0.85); /* 85% opacity black */
    backdrop-filter: blur(3px); /* Optional: blurs the website behind it */
}

/* 4. The Image inside the pop-up */
#dialog-img {
    display: block;
    max-width: 100%;
    max-height: 90vh; /* Ensures image fits on screen vertically */
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* 5. The Close Button (Top Right) */
#close-dialog-btn {
    position: absolute;
    top: -40px; /* Moves button outside the image */
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

#close-dialog-btn:hover {
    color: #ddd;
}


 @media screen and (max-width: 800px) {
  dialog#artwork-dialog {
  max-width:100vh;
  margin-left:2%;
}




