/* Photography pages styles */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-family-sans);
    color: var(--text-bright);
    background-color: var(--bg-color);
}

main {
    flex-grow: 1;
    padding-top: var(--header-height);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin-top: calc(var(--header-height) * -1);
    padding: 0 20px;
    text-align: center;
    color: var(--text-bright);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: scale(1.05);
    transition: transform 10s ease-out;
}

body.loaded .hero-bg {
    transform: scale(1);
}

.hero h1,
.hero p,
.hero .cta-button {
    z-index: 1;
}

.hero h1 {
    font-family: var(--font-family-serif-secondary);
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.hero p {
    margin-top: 15px;
    max-width: 600px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

/* --- Section Styling --- */
.content-section {
    padding: 100px 5%;
    background-color: var(--bg-color);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-family-serif-secondary);
    font-size: 2.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1rem;
    color: var(--bg-color);
    max-width: 600px;
}

/* —————————————
   Loader Spinner
   ————————————— */
@keyframes spinner {
  to { transform: rotate(360deg); }
}

.gallery-container {
    column-count: 4;
    column-gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    display: inline-block;
    break-inside: avoid;
    background: var(--surface-color);
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.5s ease-out, box-shadow 0.4s ease-out;
}

.gallery-item.loading::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px; /* center the 40×40 spinner */
  border: 4px solid rgba(161, 124, 107, 0.1);
  border-top-color: rgba(161, 124, 107, 0.8);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  z-index: 10;
}

.gallery-item.loading img {
    opacity: 0; 
}

.gallery-item:not(.loading) img {
opacity: 1;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.gallery-item a {
    display: block;
    line-height: 0;
    position: relative;
    text-decoration: none;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item img,
.gallery-item video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item.loaded img,
.gallery-item.loaded video {
  opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item.video-item {
  display: inline-block;
  width: auto;
}
.gallery-item.video-item video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.gallery-item .gallery-item-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--dark-gradient);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-content {
    text-align: center;
    color: var(--surface-color);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease-out 0.1s, opacity 0.4s ease-out 0.1s;
}

.gallery-item:hover .gallery-item-content {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item-content i {
    font-size: 2.2rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-content i {
    transform: scale(1.1);
}

.gallery-item-content h4 {
    font-family: var(--font-family-serif);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.gallery-see-all-container {
    text-align: center;
    margin-top: 40px;
}

/* image Spinner overlay */
.gallery-item::before {
content: '';
position: absolute;
top: 50%; left: 50%;
width: 40px; height: 40px;
margin: -20px 0 0 -20px;
border: 4px solid rgba(58, 56, 56, 0.63);
border-top-color: rgb(168, 156, 156);
border-radius: 50%;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
}

/* keep your loading-spinner rule only on items that start with .loading */
.gallery-item.loading::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(58, 56, 56, 0.63);
    border-top-color: rgb(168, 156, 156);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-bright);
    border: none;
    border-radius: 12px;
    margin-top: 1rem;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.section-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 1rem;
}

.section-header-custom h2 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.section-header-custom .cta-button {
    margin-top: 0; /* remove the top margin for horizontal alignment */
}


.cta-button:hover, .cta-button:focus {
    background-color:  var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

/* Responsive columns */
@media (max-width: 1024px) {
    .gallery-container {
        column-count: 3;
    }
    .section-header-custom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        column-count: 2;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .section-header-custom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-header-custom .cta-button {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        column-count: 1;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header-custom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-header-custom .cta-button {
        width: 100%;
        max-width: 250px;
        margin-top: 1rem;
    }
}
