/*
 * Custom Styles for Furry Paw Gifts
 */

:root {
    --fpg-primary-green: #a4cc66;
    --fpg-dark-green: #8db356;
    --fpg-dark-text: #2c3e50;
    --fpg-light-bg: #ffffff;
    --fpg-light-green: #f0f8e6;
    --fpg-body-bg: #f8f9fa;


    /* RGBA variables are still useful for other elements */
    --fpg-light-green-rgba: rgba(240, 248, 230, 0.9); /* 90% opacity */
    --fpg-light-bg-rgba: rgba(255, 255, 255, 0.9); /* 90% opacity */
    --fpg-light-blue-rgba: rgba(229, 239, 251, 0.9);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--fpg-dark-text);
    font-size: 0.95rem;
    background: var(--fpg-body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

/* --- **NEW** Navigation Bar Styling --- */
.navbar {
    background-color: var(--fpg-light-bg-rgba);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e0e8d4;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar .navbar-nav .nav-link {
    color: var(--fpg-dark-text);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #fff;
    background-color: var(--fpg-dark-green);
}

.navbar-toggler {
    border-color: var(--fpg-dark-green);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 62, 80, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* --- **MODIFIED** Header Styling with Pseudo-element for Blur --- */
.page-header {
    position: relative; /* Needed for the ::before pseudo-element */
    background-color: transparent; /* Main element is now fully transparent */
    border-bottom: 1px solid #e0e8d4;
    overflow: hidden; /* Important: keeps the blur within the header's bounds */
}

/* This is the new blurred background layer */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--fpg-light-green-rgba);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: -1; /* Place it behind the content */
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.site-logo {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.header-headline {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--fpg-dark-green);
    margin: 0;
    line-height: 1.2;
}


/* --- **MODIFIED** Content & Form Styling with Pseudo-element for Blur --- */
.content-section {
    position: relative; /* Needed for the ::before pseudo-element */
    background-color: var(--fpg-primary-green); /* Main element is now fully transparent */
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
    overflow: hidden; /* Important: clips the pseudo-element to the border-radius */
}

/* This is the new blurred background layer */
.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--fpg-light-bg-rgba);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: -1; /* Place it behind the content */
    border-radius: inherit; /* Make sure it inherits the parent's rounded corners */
}

.content-section hr {
    width: 80px;
    margin: 1.5rem auto;
    border-top: 3px solid var(--fpg-primary-green);
    opacity: 1;
}

.content-section-body {
    background-color: var(--fpg-primary-green);
}

.content-section-blog {
    background-color: var(--fpg-light-bg-rgba);
}

.form-control, .form-select {
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--fpg-light-bg);
    border-color: var(--fpg-dark-text);
    color: var(--fpg-dark-text);
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--fpg-dark-green);
    border-color: var(--fpg-dark-green);
    color: #fff;
}

/* ** NEW: Petfinder Form & Results Styling ** */
#petfinder-form .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.pet-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.pet-card {
    border: 1px solid #e0e8d4;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.pet-card-img-wrapper {
    width: 100%;
    height: 220px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.pet-card-img-wrapper .pet-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pet-card-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--fpg-dark-text);
    margin-bottom: 0.5rem;
}

.pet-card-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.pet-card-tags {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pet-tag {
    background-color: var(--fpg-light-green);
    color: var(--fpg-dark-green);
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

.pet-card-footer {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e0e8d4;
    text-align: center;
}

#petfinder-results-container .alert {
    border: 1px solid;
    font-weight: 600;
}

/* Spinner for loading state */
#petfinder-spinner {
    width: 3rem;
    height: 3rem;
    color: var(--fpg-dark-green);
}

/* ** NEW: Ensure spinner is hidden by default ** */
#petfinder-spinner-wrapper {
    display: none;
}


/* End Petfinder styles */


.carousel {
    border-radius: 0.75rem;
    overflow: hidden;
}

.carousel-item img {
    object-fit: cover;
    object-position: center;
    height: 400px;
    width: 100%;
}

footer {
    background-color: transparent;
}

.footer-banner {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom {
    background-color: var(--fpg-light-bg);
    border-top: 1px solid #e9ecef;
}

.footer-links a {
    color: var(--fpg-dark-text);
    text-decoration: none;
    font-weight: 600;
    margin: 0 0.5rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--fpg-dark-green);
    text-decoration: underline;
}

.footer-links span {
    color: #ced4da;
}

#form-message {
    font-weight: 600;
}

#form-message.success {
    color: #0f5132;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
}

#form-message.error {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
}

@media (max-width: 768px) {
    body {
        font-size: 1rem;
    }

    .header-flex {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .header-headline {
        font-size: 1.8rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .carousel-item img {
        height: 250px;
    }
}

/* ** NEW: Modal Styling ** */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    background-color: var(--fpg-light-blue-rgba);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.modal-header {
    border-bottom: 1px solid #e0e8d4;
}

.modal-header .btn-close {
    transition: transform 0.2s ease;
}

.modal-header .btn-close:hover {
    transform: rotate(90deg);
}