/* Basic Reset & Body Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}



/* Header */
header {
    background-color: #ff99cc; /* Poppy pink */
    color: white;
    padding: 40px 0px;
    text-align: center;
    border-bottom: 5px solid #ff66b2;
    margin-bottom: 0px;
}

header h1 {
    margin: 0;
    font-size: 3em;
}

header p {
    margin: 0px;
    font-size: 1.2em;
    color: #8A4F6B;
}

/* Main Navigation Styles */
.main-nav {
    background-color: #f7a9a8; /* A warm pink, matching header gradient start */
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 40px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px; /* Space between nav items */
}

.main-nav li {
    /* No specific styling needed here */
}

.main-nav a {
    text-decoration: none;
    color: white; /* Text color remains white for contrast */
    font-size: 1.4em; /* Slightly larger font for prominence */
    padding: 12px 28px; /* Increased padding for a meatier button feel */
    border-radius: 10px; /* More rounded corners for a soft, friendly button */

    /* --- NEW/UPDATED STYLES FOR POP-OUT EFFECT --- */
    background-color: #E57373; /* A strong, clear pink background (from original palette) */
    box-shadow: 0 5px 12px rgba(0,0,0,0.25); /* Subtle shadow to lift the button */
    transition: all 0.3s ease; /* Smooth transition for all hover effects */
    -webkit-text-stroke: 0.5px black; /* Keep subtle text outline */
    text-shadow: none; /* Ensure no text shadow */
}

.main-nav a:hover {
    background-color: #F06292; /* A slightly different, vibrant pink on hover (Poppy's name color) */
    transform: translateY(-3px); /* Lift effect on hover */
    box-shadow: 0 8px 18px rgba(0,0,0,0.35); /* Stronger shadow on hover */
    color: white; /* Ensure text color remains white on hover */
}

/* Sections */
section {
    background-color: white;
    margin: 20px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section h2 {
    color: #ff66b2; /* Darker pink for headings */
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
}

/* Image Gallery Styling (Zig-zag Layout) */
#gallery {
    padding: 60px 20px; /* Slightly more padding for the section */
    margin: 30px auto;
    background-color: #ffebe6; /* A very light, warm background for the gallery section */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 1000px; /* Matches container width */
}

#gallery h2 {
    margin-bottom: 50px; /* More space below heading */
}

.gallery-item-row {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    align-items: center; /* Vertically aligns items in the middle */
    gap: 40px; /* Space between image and text */
    margin-bottom: 60px; /* Space between each row */
    padding: 20px; /* Internal padding for each row */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Subtle shadow for each row */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item-row:last-of-type {
    margin-bottom: 0; /* No margin after the last row */
}

.gallery-item-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-image {
    flex: 1; /* Allows image container to grow */
    min-width: 300px; /* Minimum width for the image container before wrapping */
    position: relative;
    padding-bottom: 70%; /* Maintains a 4:3 aspect ratio (adjust as needed for your images) */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.gallery-image img,
.gallery-image video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video fills the container, cropping if aspect ratios differ */
    object-position: top;
}

.gallery-text {
    flex: 1; /* Allows text container to grow */
    min-width: 300px; /* Minimum width for the text container before wrapping */
    padding: 10px 0; /* Some padding for text */
}

.gallery-text h3 {
    color: #e57373; /* Match heading color */
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
}

.gallery-text p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    text-align: justify;
}

/* Zig-zag effect: Reverse order for odd rows (or rows with 'reverse' class) */
.gallery-item-row.reverse {
    flex-direction: row-reverse; /* Puts image on the right, text on the left */
}

/* Responsive Adjustments for Zig-zag Layout */
@media (max-width: 900px) {
    .gallery-item-row {
        gap: 30px;
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }
    .gallery-image,
    .gallery-text {
        min-width: unset;
        flex: 1 1 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .gallery-item-row.reverse {
        flex-direction: column;
    }
    .gallery-text h3 {
        text-align: center;
        margin-top: 20px;
    }
    .gallery-text p {
        text-align: center;
    }
    /* === IMPORTANT CHANGE HERE === */
    .gallery-image {
        padding-bottom: 130%; /* Increased for portrait mode (height will be 130% of width) */
        /* Original was often 70% or 75% for landscape */
    }
    .main-nav ul {
        gap: 15px;
    }
    .main-nav a {
        font-size: 1.1em;
        padding: 6px 12px; /* Slightly less padding */
    }

    /* Grid adjustments for Gallery Page */
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Smaller min-width for tablets */
        gap: 15px;
    }
    .grid-item {
        padding-bottom: 70%; /* Adjust aspect ratio for tablets if needed (e.g., 90% for squarer) */
    }
}

@media (max-width: 480px) {
    #gallery {
        padding: 40px 15px;
        margin: 20px auto;
    }
    .gallery-item-row {
        margin-bottom: 40px;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    .gallery-text h3 {
        font-size: 1.5em;
    }
    .gallery-text p {
        font-size: 1em;
    }
    /* === IMPORTANT CHANGE HERE === */
    .gallery-image {
        padding-bottom: 130%; /* Keep consistent with larger mobile breakpoint */
        width: 100%;
        box-sizing: border-box;
    }
    .main-nav ul {
        flex-direction: column; /* Stack nav items vertically on small phones */
        gap: 10px; /* Keep gap, but margin-bottom will be dominant for vertical spacing */
    }
    .main-nav li { /* --- NEW STYLE HERE --- */
        margin-bottom: 10px; /* Add explicit space below each stacked button */
    }
    .main-nav li:last-child { /* --- NEW STYLE HERE: Remove margin from the very last button --- */
        margin-bottom: 0;
    }
    .main-nav a {
        padding: 10px 20px;
        font-size: 1.2em;
        width: 80%;
        margin: 0 auto;
    }
    }

    /* Grid adjustments for Gallery Page */
    #photo-video-grid {
        padding: 40px 15px;
        margin: 20px auto;
    }
    #photo-video-grid h2 {
        font-size: 2em;
    }
    .grid-container {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 15px;
    }
    .grid-item {
        padding-bottom: 80%; /* Adjust aspect ratio for single column mobile (e.g., 80% for slightly taller-than-square) */
        /* IMPORTANT: If most of your photos are portrait, consider setting this to 120-150% like we did for the main gallery */
    }
}

/* Video Container */
.video-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allows multiple videos to wrap */
    gap: 20px;
}

.video-container video {
    width: 100%;
    max-width: 600px; /* Max width for videos */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Adopt Button */
.adopt-button {
    display: block; /* Makes it take full width of its container */
    width: fit-content; /* Adjusts width to content */
    margin: 30px auto; /* Centers the button */
    padding: 15px 30px;
    background-color: #4CAF50; /* Green for action */
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px; /* Pill shape */
    transition: background-color 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.adopt-button:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #333;
    color: white;
    font-size: 0.9em;
}

/* Styling for Health Checkmarks */
.health-checks {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    margin-top: 25px; /* Space above the list */
    margin-bottom: 25px; /* Space below the list */
    text-align: center; /* Center the list items */
}

.health-checks li {
    font-size: 1.25em; /* Make text slightly larger than paragraph */
    margin-bottom: 12px; /* Space between list items */
    color: #000; /* Standard text color */
    font-weight: 500; /* Slightly bolder text */
}

.health-checks li span.tick {
    color: #4CAF50; /* A nice green color for the tick mark */
    margin-right: 10px; /* Space between tick and text */
    font-weight: bold;
    font-size: 1.5em; /* Make the tick mark visibly larger */
    vertical-align: middle; /* Align tick mark with text */
}

/* Photo/Video Grid for Gallery Page */
#photo-video-grid {
    padding: 60px 20px;
    margin: 30px auto;
    background-color: #ffebe6; /* Light background for the section */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 1000px; /* Max width for the container */
}

#photo-video-grid h2 {
    color: #e57373; /* Match other section headings */
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 50px;
    position: relative;
}

#photo-video-grid h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #ffccbc;
    border-radius: 2px;
}

.grid-container {
    display: grid;
    /* Responsive grid: 2 columns on medium, 3 on large, 1 on small */
    /* This will allow items to be at least 280px wide before wrapping */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* Space between grid items */
}

.grid-item {
    position: relative;
    width: 100%;
    /* === IMPORTANT CHANGE HERE: Increased for portrait images === */
    /* If your portrait images are roughly 3:4 aspect ratio, use 130-135% */
    /* If they are taller (e.g., 9:16 phone photos), consider 160-177% */
    padding-bottom: 135%; /* For portrait aspect ratio (height is 135% of width) */
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.grid-item img,
.grid-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the container, cropping if aspect ratio differs */
    object-position: center;
}