/* Color Scheme Variables */
:root {
    --primary-color: #ffffff; /* White */
    --secondary-color: #000000; /* Black */
    --silver-color: #C0C0C0; /* Silver for header background */
    --content-accent: #000000; /* Black for content accents */
}

/* -------------------------------------- */
/* 1. MOBILE-FIRST BASE STYLES (Default) */
/* -------------------------------------- */

/* General Setup */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Header and Navigation */
header {
    background-color: var(--silver-color); 
    color: var(--secondary-color); 
    padding: 15px 0; /* Reduced padding for mobile */
    text-align: center;
    border-bottom: none; 
}

h1 {
    font-size: 2em; /* Smaller on mobile */
    text-transform: uppercase;
    letter-spacing: 3px; /* Reduced spacing */
    margin-bottom: 5px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow navigation items to wrap on smaller screens */
    gap: 10px; /* Smaller gap on mobile */
}

nav a {
    color: var(--secondary-color); 
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8em; /* Smaller link text */
    padding: 5px 8px;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

nav a:hover {
    color: var(--silver-color); 
    border-bottom: 1px solid var(--silver-color);
}

/* Main Content and Section Styling */
main {
    padding: 20px 5%; /* Reduced padding on mobile */
}

section {
    padding: 20px 0; /* Reduced padding on mobile */
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--content-accent);
}

section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

h2 {
    color: var(--content-accent);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-size: 1.5em; /* Smaller heading on mobile */
}

/* Image Gallery Styles - Mobile defaults to single column */
.gallery {
    display: flex;
    flex-direction: column; /* Stacks images vertically by default */
    gap: 20px;
    justify-content: center;
}

/* **REMOVED FIXED WIDTH** - Allows images to span container on mobile */
.main-gallery-row,
.center-headshot-container {
    display: contents; /* Removes flex properties to allow stacking */
}

.gallery figure {
    margin: 0 auto; /* Center individual image */
    flex: 1 1 100%; /* Default: full width on mobile */
    max-width: 300px; /* Maximum size for mobile images */
    text-align: center;
}

/* Specific galleries for mobile */
#personal-gallery .gallery figure,
#digital-shot-gallery .gallery figure {
    /* Use the standard full-width mobile layout */
    max-width: 300px; 
}

/* DEFAULT IMAGE STYLING */
.gallery img {
    max-width: 100%; /* Ensures images scale down on tiny screens */
    width: 100%; 
    height: auto;
    display: block;
    border: none; 
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.03);
}

.gallery figcaption {
    margin-top: 10px;
    font-style: italic;
    font-size: 0.9em;
    color: var(--secondary-color);
}

/* Biography Section - Mobile: Stacks measurements and background info */
.bio-container {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 20px;
    align-items: center; /* Center content horizontally */
}

.measurements, .background-info {
    flex: none; /* Reset flex properties */
    padding: 10px;
    max-width: 100%; /* Use full width of container */
    text-align: center;
}

.measurements h3, .background-info h3 {
    color: var(--content-accent);
    text-transform: uppercase;
    border-bottom: 1px solid var(--secondary-color); 
    padding-bottom: 5px;
    margin-top: 0;
}

.measurement-list {
    list-style: none;
    padding: 0;
    text-align: left; /* Align list content */
    max-width: 250px;
    margin: 0 auto;
}

.measurement-list li {
    padding: 3px 0;
}

.measurement-list strong {
    color: var(--content-accent); 
}

/* Agencies Section */
.agency-list {
    list-style: disc;
    max-width: 90%;
    margin: 0 auto;
    color: var(--secondary-color);
}

.agency-list li {
    padding: 8px 0;
    font-size: 1em; /* Adjusted font size */
    border-bottom: 1px dotted rgba(0, 0, 0, 0.2);
}

/* Contact Form Styling */
.contact-form-container {
    max-width: 100%; /* Use full width on mobile */
    margin: 10px auto; 
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 8px; /* Slightly reduced padding */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.form-group button:hover {
    background-color: #333;
}

/* Social Link */
.social-link {
    text-align: center; 
    margin-top: 15px;
}

.social-link a {
    text-decoration: none;
    display: inline-block;
}

.social-link img {
    /* Use HTML attributes for width/height (40px) */
    vertical-align: middle;
    border: none;
    transition: opacity 0.3s;
}

.social-link a:hover img {
    opacity: 0.8;
}


/* Footer */
footer {
    text-align: center;
    padding: 15px 0;
    background-color: var(--primary-color); 
    color: var(--secondary-color); 
    font-size: 0.8em;
    font-weight: bold;
}

/* -------------------------------------- */
/* 2. MEDIA QUERIES (Tablet and Desktop) */
/* -------------------------------------- */

/* Tablet and larger screens (e.g., 768px and up) */
@media (min-width: 768px) {
    
    /* Navigation - spread out slightly */
    nav ul {
        gap: 20px;
    }
    
    /* Gallery */
    .gallery figure {
        max-width: 250px; /* Re-establish a standard image width */
    }

    /* Main Gallery - Re-introduce two-column layout */
    .main-gallery-row {
        display: flex;
        justify-content: space-between; 
        width: 520px; /* 2 x 250px (max img) + 20px (gap) = 520px */
        margin: 0 auto; 
        gap: 20px;
    }

    .center-headshot-container {
        /* Re-introduce flex to center the single headshot correctly */
        display: flex;
        justify-content: center;
        width: 100%;
        flex-basis: 100%;
        margin-top: 20px;
    }

    /* Personal Gallery - three-column layout */
    #personal-gallery-images {
        flex-direction: row;
    }
    #personal-gallery .gallery figure {
        flex: 1 1 200px; 
    }

    /* Polas - three-column layout */
    #digital-shot-gallery {
        flex-direction: row;
    }
    #digital-shot-gallery .gallery figure {
        flex: 1 1 30%; 
    }

    /* Biography Section - Two columns side-by-side */
    .bio-container {
        flex-direction: row;
        gap: 40px;
        justify-content: center;
        align-items: flex-start;
    }
    
    .measurements, .background-info {
        flex: 1;
        padding: 20px;
        max-width: 400px;
        text-align: left;
    }

    .measurement-list {
        margin: 0;
        text-align: left;
    }

    /* Contact Form - set maximum width to center it */
    .contact-form-container {
        max-width: 500px;
        margin: 20px auto; 
        padding: 20px;
    }
}


/* Desktop and larger screens (e.g., 1024px and up) */
@media (min-width: 1024px) {
    header {
        padding: 20px 0;
    }
    h1 {
        font-size: 3em;
        letter-spacing: 5px;
    }
    main {
        padding: 40px 10%;
    }
    h2 {
        font-size: 2em;
    }
    .agency-list {
        max-width: 600px;
    }
}