:root {
    --main-bg: #f5f5f5;
    --text-color: #2c2c2c;
    --accent-color: #3b3b3b;
    --link-hover: #97754fd2;
    --focus-outline: #4a90e2;
}

.archive-container h1 {
    text-align: center;
    color: var(--link-hover);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 1.5px;
    animation: fadeInScale 1s ease-in-out;
}
.archive-container h1::after { /* Fixed selector */
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: rgba(184, 150, 110, 0.877);
    margin: 10px auto 0;
}
.wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 10px;
    justify-content: center;
    padding: 0 20px;
}

.archive-container {
    max-width: 1200px;
    
}

/* Card */
.card {
    width: 100%;  /* Ensures full width inside the grid */
    max-width: 340px;  /* Prevents cards from becoming too big */
    min-width: 310px;  /* Ensures a minimum readable size */
    min-height: 280px;  /* Keeps a consistent height */
    
    background: #ffffff;
    padding: 20px;  /* Reduced padding for smaller screens */
    border-radius: 10px;
    box-sizing: border-box;
    color: var(--text-color);
    margin: 10px;  /* Adjusted margin for spacing */
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: slideIn 0.6s forwards ease-in-out;
    border: 1px solid #ddd;
    position: relative;
    overflow: hidden;
}

/* Hover effect */
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.15);
}

/* Title inside the card */
.card-title {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
    border-left: 4px solid var(--link-hover);
    padding-left: 10px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards 0.3s;
}

/* Content inside the card */
.card-content {
    font-size: 15px;
    letter-spacing: 0.5px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards 0.5s;
}

/* Animated button */
.card-btn {
    all: unset;
    display: inline-block;
    text-align: center;
    border: 2px solid var(--link-hover);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.4s ease-in-out;
    cursor: pointer;
    color: var(--link-hover);
    background: transparent;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeIn 1.2s ease-in-out forwards 0.7s;
    position: relative;
}

/* Button Hover & Click Effect */
.card-btn:hover {
    color: white;
    background: var(--link-hover);
    transform: translateY(-3px);
}

.card-btn:active {
    transform: scale(0.95);
}

/* Responsive Container Padding */
.archive-container {
    padding: 100px;
    background: var(--main-bg);
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Media Queries for Responsive Adjustments */
@media (max-width: 1024px) {
    .archive-container {
        padding: 80px;
    }
    .card{
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .wrapper {
        grid-template-columns: 1fr; /* Single column for smaller screens */
    }

    .archive-container {
        padding: 60px;
    }

    h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .archive-container {
        padding: 80px;
    }

    h1 {
        font-size: 22px;
    }
}


/* Video Section Styles */
.video-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.video-caption {
    text-align: center;
    margin-top: 10px;
    color: var(--text-color);
    font-style: italic;
}

/* Carousel Styles */
 
.carousel-container {  
    position: relative;  
    max-width: 1000px;  
    margin: 40px auto;  
    overflow: hidden;  
    border-radius: 10px;  
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);  
    background: #f5f5f5;  
}  
  
.carousel-track {  
    display: flex;  
    transition: transform 0.5s ease-in-out;  
    height: 100%;  
}  
  
.carousel-slide {  
    flex: 0 0 100%;  
    width: 100%;  
    display: flex;  
    justify-content: center;  
    align-items: center;  
    padding: 20px;  
}  
  
.carousel-image-container {  
    position: relative;  
    max-width: 100%;  
    max-height: 80vh;  
    display: flex;  
    justify-content: center;  
    align-items: center;  
}  
  
.carousel-image-container img {  
    max-width: 100%;  
    max-height: 80vh;  
    object-fit: contain;  
    display: block;  
    margin: auto;  
}  
  
.carousel-button {  
    position: absolute;  
    top: 50%;  
    transform: translateY(-50%);  
    background: rgba(184, 150, 110, 0.8);  
    color: white;  
    border: none;  
    width: 40px;  
    height: 40px;  
    border-radius: 50%;  
    cursor: pointer;  
    font-size: 18px;  
    transition: all 0.3s ease;  
    z-index: 2;  
    display: flex;  
    justify-content: center;  
    align-items: center;  
}  
  
.carousel-button:hover {  
    background: rgba(184, 150, 110, 1);  
    transform: translateY(-50%) scale(1.1);  
}  
  
.carousel-button.prev {  
    left: 20px;  
}  
  
.carousel-button.next {  
    right: 20px;  
}  
  
.carousel-dots {  
    position: absolute;  
    bottom: 20px;  
    left: 50%;  
    transform: translateX(-50%);  
    display: flex;  
    gap: 8px;  
    z-index: 2;  
}  
  
.carousel-dot {  
    width: 10px;  
    height: 10px;  
    border-radius: 50%;  
    background: rgba(184, 150, 110, 0.5);  
    cursor: pointer;  
    transition: all 0.3s ease;  
}  
  
.carousel-dot.active {  
    background: rgba(184, 150, 110, 1);  
    transform: scale(1.2);  
}  
  
/* Responsive Design */  
@media (max-width: 768px) {  
    .carousel-container {  
        margin: 20px;  
        border-radius: 8px;  
    }  
  
    .carousel-button {  
        width: 35px;  
        height: 35px;  
        font-size: 16px;  
    }  
  
    .carousel-button.prev {  
        left: 10px;  
    }  
  
    .carousel-button.next {  
        right: 10px;  
    }  
  
    .carousel-slide {  
        padding: 10px;  
    }  
  
    .carousel-image-container {  
        max-height: 70vh;  
    }  
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}



/* Add these styles for the modal/lightbox */
.carousel-image-container {
    cursor: zoom-in;
}

.image-modal {  
    display: none;  
    position: fixed;  
    z-index: 1000;  
    padding: 20px;  
    left: 0;  
    top: 0;  
    width: 100%;  
    height: 100%;  
    background-color: rgba(0, 0, 0, 0.9);  
    overflow: hidden;  
    overscroll-behavior: none; /* Prevent scrolling behind modal */  
    touch-action: none; /* Improve touch handling */  
}
.modal-content {  
    margin: auto;  
    display: block;  
    max-width: 90%;  
    max-height: 90vh;  
    transform-origin: center center;  
    cursor: zoom-in;  
    user-select: none;  
    -webkit-user-drag: none;  
    will-change: transform; /* Hint for browser to optimize transforms */  
    backface-visibility: hidden; /* Reduce flickering */  
    -webkit-backface-visibility: hidden;  
    transition: transform 0.3s ease-out, opacity 0.2s ease;  
}

.modal-close {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    color: var(--link-hover);
}

.modal-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.modal-btn {
    background: rgba(184, 150, 110, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-btn:hover {
    background: rgba(184, 150, 110, 1);
    transform: scale(1.1);
}

.modal-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.zoom-btn {
    background: rgba(184, 150, 110, 0.8);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(184, 150, 110, 1);
    transform: scale(1.1);
}
/* Improve button responsiveness */  
.modal-btn, .zoom-btn {  
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */  
    touch-action: manipulation; /* Optimize for touch */  
}
/* Animation for modal */
@keyframes modalFadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

.modal-fade-in {
    animation: modalFadeIn 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-zoom-controls {
        bottom: 10px;
    }
    
    .zoom-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .modal-btn {
        width: 35px;
        height: 35px;
    }
}