/* CSS for Dan Coletta Photography site
   Updated layout for gallery to wrap photos to next line with slanted titles
*/
:root{
    --bg:#e8e3d8;
    --card:#ebe8e3;
    --text:#2d2d2d;
    --accent:#6b8e7f;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:var(--bg);
    color:var(--text);
    font-family:system-ui,sans-serif;
    min-height:100vh;
}

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 40px;
    background:var(--accent);
    position:sticky;
    top:0;
    z-index:100;
}

.logo{
    font-size:1.5rem;
    font-weight:700;
    color:white;
    text-decoration:none;
}

.logo:hover{
    opacity:.8;
}

nav{
    display:flex;
    gap:25px;
}

nav a{
    color:white;
    text-decoration:none;
}

nav a:hover{
    opacity:.7;
}

.hero{
    min-height:85vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:2rem;
}

.hero-content h1{
    font-size:4rem;
    margin-bottom:1rem;
    color:var(--accent);
}

.hero-content p{
    font-size:1.2rem;
    color:var(--text);
}

.btn{
    display:inline-block;
    margin-top:2rem;
    padding:14px 30px;
    background:var(--accent);
    color:white;
    text-decoration:none;
    border-radius:8px;
}

.about{
    max-width:800px;
    margin:auto;
    padding:4rem 2rem;
    text-align:center;
}

.gallery-container{
    padding:20px;
}

/* Gallery section with flexbox layout for title and images */
.gallery-section{
    display:flex;
    align-items:flex-start;
    gap:20px;
    padding:40px 20px;
}

.gallery-section h2{
    height:640px;
    display:flex;
    align-items:center;
    justify-content:center;
    transform:rotate(-45deg);
    font-size:2.5rem;
    font-weight:700;
    color:var(--accent);
    white-space:nowrap;
    flex:0 0 auto;
    min-width:200px;
    text-align:center;
    writing-mode:horizontal-tb;
}

/* Gallery layout with flex-wrap enabled so images wrap to the next line instead of scrolling */
.masonry{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    padding:10px 0;
    align-items:flex-start;
}

.masonry img{
    height:640px; /* 20% smaller than original 800px */
    width:auto;
    flex:0 0 auto; /* don't shrink or grow */
    margin:0; /* spacing handled by gap on the container */
    border-radius:12px;
    cursor:pointer;
    transition:.3s;
    object-fit:cover;
}

.masonry img:hover{
    transform:scale(1.02);
}

#lightbox{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.95);
    z-index:999;
    justify-content:center;
    align-items:center;
}

#lightbox-img{
    max-width:90%;
    max-height:90%;
}

#close{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:3rem;
    cursor:pointer;
}

.contact-section{
    padding:5rem 2rem;
    text-align:center;
}

.contact-card{
    background:var(--card);
    max-width:500px;
    margin:2rem auto;
    padding:2rem;
    border-radius:12px;
    border:2px solid var(--accent);
}

.contact-card a{
    color:var(--accent);
    text-decoration:none;
}

.contact-card a:hover{
    text-decoration:underline;
}

footer{
    text-align:center;
    padding:2rem;
    color:var(--accent);
}

/* Responsive tweaks: reduce image height on smaller screens */
@media(max-width:900px){
    .masonry{
        gap:12px;
    }

    .masonry img{
        height:512px;
    }

    .gallery-section h2{
        height:512px;
    }

    .hero-content h1{
        font-size:2.8rem;
    }
}

@media(max-width:600px){

    header{
        flex-direction:column;
        gap:15px;
    }

    .gallery-section{
        flex-direction:column;
        gap:10px;
    }

    .gallery-section h2{
        height:auto;
        transform:none;
        width:100%;
        margin-bottom:10px;
        min-width:auto;
    }

    .masonry img{
        height:384px;
    }

    .hero-content h1{
        font-size:2rem;
    }
}
