@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --black: #050403;
  --black-soft: #0c0a08;
  --gold: #b58a4a;
  --gold-soft: #d0b27a;
  --ivory: #f2eadc;
  --muted: #b7ab9a;
  --line: rgba(181, 138, 74, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: "Cinzel", sans-serif;
  line-height: 1.6;
}

/* --- ENHANCED GALLERY LAYOUT COMPONENTS --- */

/* The Outer Flexbox Frame - (remains the same) */
.gallery {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
    padding: 40px 24px !important;
    margin-top: 110px;
}

/* 1. The Photo Frame Wrapper - Determines the sizing box and handles clipping */
.gallery .photo-card {
    width: 340px !important;
    height: 240px !important;
    overflow: hidden;               /* CRITICAL: This clips the image when it grows */
    border-radius: 6px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;                /* Changes cursor to a hand, signaling clickability */
}

/* 2. The Base Image State - Setup transition */
.gallery .photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease; /* Adds a smooth 0.4 second animation to any movement */
}

/* 3. The Active Hover State - The zoom */
.gallery .photo-card:hover img {
    transform: scale(1.1);          /* Increases image size by 10% smoothly */
}
/* --- MODAL (LIGHTBOX) STYLING --- */

/* 1. The full-screen darkened background layer */
.modal-overlay {
    display: none;                  /* Starts completely hidden */
    position: fixed;
    z-index: 2000;                  /* High z-index to stay on top of the fixed header */
    inset: 0;                       /* Efficient way to set top: 0; left: 0; right: 0; bottom: 0; */
    background-color: rgba(5, 4, 3, 0.95); /* Deep luxury black with high opacity */
    justify-content: center;        /* Centers image horizontally */
    align-items: center;            /* Centers image vertically */
    backdrop-filter: blur(5px);     /* Modern touch: blurs the underlying page */
    cursor: zoom-out;               /* Signals clicking the background closes it */
}

/* 2. JavaScript will add this class to make the modal appear */
.modal-overlay.active {
    display: flex;                  /* Forces flexbox layout to show up */
    animation: fadeIn 0.3s ease;    /* Optional smooth animation */
}

/* 3. The Close Button (X) */
.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--ivory);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--gold);             /* Ties in your luxury accent color */
}

/* 4. The Enlarged Image itself */
.modal-content {
    max-width: 90%;                 /* Constraints to ensure it stays within view */
    max-height: 85vh;               /* Constrains vertical height (85% of viewport height) */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--line);
    border-radius: 4px;
    object-fit: contain;            /* Ensures entire image is visible without cropping */
}

/* Optional Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}