/* style.css */
body {
    background-color: #0d0d11;
    color: #f3f4f6;
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 3rem 1rem; /* Uniform padding around the entire screen edge */
}

/* Zero out the bottom margin of the first title */
.home-header h1 {
    margin-bottom: 0; 
    text-align: center;
}

/* Zero out the top margin of the second title */
.home-header h2 {
    margin-top: 4px; /* Adjust this number (e.g., 0, 2px, 8px) to get the exact spacing you want */
    text-align: center;
}

/* The Grid Container */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px); 
    
    /* Explicitly setting both row (vertical) and column (horizontal) gaps */
    row-gap: 1rem;
    column-gap: 1rem;
    
    max-width: 1200px;
    margin: 2rem auto; /* Added 2rem to top/bottom margins to give the grid breathing room */
    justify-content: center; 
    padding-bottom: 390px;
}

/* ==========================================================================
   2. STANDARD GALLERY CARDS (Images)
   ========================================================================== */
   .event-card {
    text-decoration: none;
    color: inherit;
    background-color: #1a1a24;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.event-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.event-card .card-content {
    padding: 20px;
}

.event-card h2 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
}

.event-card p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 0.95rem;
}

.venue-tag {
    display: inline-block;
    background-color: #1a1a24;
    /* padding: 4px 8px; */
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.back-link {
    position: relative; /* Required for z-index to work */
    z-index: 99;       /* Forces the link to sit on the very top layer of the screen */
    display: inline-block; /* Ensures the clickable box has structure */
}

/* ==========================================
   Gallery Page Styles
   ========================================== */

/* Vertical Masonry Layout using CSS Columns */
.home-header, 
.gallery-header {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px 20px;
}

.photo-gallery {
    /* Tells the browser to split content into columns that are roughly 300px wide */
    column-width: 300px; 
    /* The horizontal gap between the vertical columns */
    column-gap: 1.5rem; 
    
    max-width: 1400px;
    margin: 0 auto;
}

.photo-gallery img {
    width: 100%;
    /* REMOVED the fixed height! Let the image dictate its own vertical space */
    height: auto; 
    
    /* CRUCIAL: Prevents an image from breaking awkwardly across two columns */
    break-inside: avoid; 
    
    /* The vertical gap between photos in the SAME column */
    margin-bottom: 1.5rem; 
    
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.photo-gallery img:hover {
    opacity: 0.8;
}

/* ==========================================================================
   3. ALTERNATIVE UTILITY CARDS (Instagram & Contact Form Box)
   ========================================================================== */
   .portfolio-card-alt {
    background-color: #1a1a24;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.portfolio-card-alt .card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.portfolio-card-alt h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Instagram Action Button */
.instagram-link {
    display: inline-block;
    margin-top: auto; /* Pushes button beautifully to the bottom of the card */
    padding: 12px 20px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition: transform 0.2s ease;
}

.instagram-link:hover {
    transform: translateY(-2px);
}

/* Internal Card Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #555;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background-color: #ffffff;
}

.submit-btn {
    background-color: #333333;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    width: 100%;
}

.submit-btn:hover {
    background-color: #555555;
}

/* Update the wrapper to behave cleanly in the masonry column layout */
.photo-gallery a.gallery-link {
    display: block;
    margin-bottom: 20px;
    text-decoration: none;
    cursor: zoom-in;
    break-inside: avoid; /* Prevents layout blocks splitting across columns */
}

/* Ensure the image stretches properly inside the link container */
.photo-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

/* Subtle hover effect to let users know the image is clickable */
.photo-gallery a.gallery-link:hover img {
    transform: scale(1.02);
}

