/**
 * Front-end Styles for Daphnée Gallery
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
    --dg-beige: #FFFDF9;
    --dg-terracotta: #C4956A;
    --dg-dark: #3E2F23;
    --dg-sand: #F2E8DF;
    --dg-gutter: 8px; /* Fixed gutter as requested 5-10px */
}

.dg-gallery-wrapper {
    background-color: var(--dg-beige);
    font-family: 'Raleway', sans-serif;
    color: var(--dg-dark);
}

/* Minimal Nav */
.dg-site-nav {
    padding: 20px 40px;
    background: #fff;
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid var(--dg-sand);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dg-nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--dg-dark);
    text-decoration: none;
    letter-spacing: 1px;
    font-style: italic;
}

/* Hero Section */
.dg-gallery-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.dg-gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(62, 47, 35, 0.4);
}

.dg-gallery-hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.dg-gallery-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.dg-gallery-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Container */
.dg-gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.dg-gallery-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dg-sand);
}

.dg-photo-count {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--dg-terracotta);
}

/* Masonry Grid */
.dg-masonry-grid {
    margin: 0 auto;
}

/* Columns for Masonry */
.dg-grid-sizer,
.dg-grid-item {
    width: 33.333%; /* 3 columns */
    padding: var(--dg-gutter);
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .dg-grid-sizer,
    .dg-grid-item {
        width: 50%; /* 2 columns */
    }
}

@media (max-width: 600px) {
    .dg-grid-sizer,
    .dg-grid-item {
        width: 100%; /* 1 column */
    }
    .dg-gallery-title {
        font-size: 3rem;
    }
}

@media (min-width: 1800px) {
    .dg-grid-sizer,
    .dg-grid-item {
        width: 25%; /* 4 columns on very large screens */
    }
}

.dg-grid-item {
    position: relative;
    margin-bottom: 0; /* Handled by gutter padding */
    overflow: hidden;
}

.dg-lightbox-link {
    display: block;
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.dg-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.dg-grid-item:hover img {
    transform: scale(1.05);
}

/* Overlay & Zoom Icon */
.dg-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(62, 47, 35, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dg-grid-item:hover .dg-item-overlay {
    opacity: 1;
}

.dg-icon-zoom {
    color: #fff;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Controls (Download) */
.dg-item-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dg-grid-item:hover .dg-item-controls {
    opacity: 1;
    transform: translateY(0);
}

.dg-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--dg-dark);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background 0.3s, color 0.3s;
}

.dg-btn-download:hover {
    background: var(--dg-terracotta);
    color: #fff;
}

/* Footer */
.dg-gallery-footer {
    text-align: center;
    padding: 80px 20px;
    border-top: 1px solid var(--dg-sand);
}

.dg-quote {
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: var(--dg-dark);
    opacity: 0.8;
}

.dg-signature {
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--dg-terracotta);
}

/* Hide default WP footer credit if injected */
.dg-gallery-wrapper + footer,
.dg-gallery-wrapper ~ footer,
.powered-by-wordpress,
.site-info {
    display: none !important;
}

/* Ensure our footer signature is visible */
.dg-gallery-footer {
    display: block !important;
}

.dg-signature {
    display: block !important;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--dg-terracotta);
    margin-top: 10px;
}
