/* Dropdown Navigation Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Base button styles matching standard links */
.nav-dropdown > button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

@media (min-width: 1280px) {
    .nav-dropdown > button {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
    }
}

@media (min-width: 1536px) {
    .nav-dropdown > button {
        font-size: 0.875rem;
    }
}

.nav-dropdown > button:hover,
.nav-dropdown:hover > button {
    color: var(--primary, #d89a00);
}

.nav-dropdown > button > div {
    transition: transform 0.3s;
}

.nav-dropdown:hover > button > div {
    transform: rotate(-180deg);
}

/* Dropdown menu container */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 50;
}

.nav-dropdown-right .nav-dropdown-menu {
    right: 0;
    left: auto;
}

@media (min-width: 1280px) {
    .nav-dropdown-right .nav-dropdown-menu {
        left: 0;
        right: auto;
    }
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* Dropdown list styling */
.nav-dropdown-list {
    background-color: #F3F0E6;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 0.5rem 0;
}

.nav-dropdown-right .nav-dropdown-list {
    min-width: 220px;
}

.nav-dropdown-list a {
    padding: 0.75rem 1.5rem;
    font-size: 10px;
    font-weight: 900;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
    text-decoration: none;
}

@media (min-width: 1280px) {
    .nav-dropdown-list a {
        font-size: 0.75rem;
    }
}

.nav-dropdown-list a:hover {
    color: var(--primary, #d89a00);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Custom Section Spacing */
.stats-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.about-section {
    padding-top: 1rem;
}

/* Find Us Section */
.find-us-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .find-us-grid {
        gap: 2rem;
    }
}

.find-us-item {
    flex: 1 1 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .find-us-item {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (min-width: 1024px) {
    .find-us-item {
        /* Account for 3 gaps of 2rem each (6rem total). Div by 4 = 1.5rem */
        flex: 0 0 calc(25% - 1.5rem);
        max-width: calc(25% - 1.5rem);
    }
}

.find-us-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.blog-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.blog-card {
    flex: 0 0 auto;
    width: 300px;
}
@media (min-width: 768px) {
    .blog-card {
        width: 350px;
    }
}

/* Dynamic Action Button Animation */
@keyframes btnSlideOut {
    0%   { opacity: 1; transform: translateY(0) scaleY(1); }
    100% { opacity: 0; transform: translateY(-12px) scaleY(0.7); }
}

@keyframes btnSlideIn {
    0%   { opacity: 0; transform: translateY(12px) scaleY(0.7); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

.btn-slide-out {
    animation: btnSlideOut 0.3s ease-in forwards;
}

.btn-slide-in {
    animation: btnSlideIn 0.3s ease-out forwards;
}

/* Missing Tailwind Classes for Donation Section Layout */
.max-w-md { max-width: 28rem !important; }
@media (min-width: 768px) {
    .md\:items-start { align-items: flex-start !important; }
    .md\:text-left { text-align: left !important; }
    .md\:mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
    .md\:text-justify { text-align: justify !important; text-align-last: center !important; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .lg\:items-center { align-items: center !important; }
    .lg\:items-start { align-items: flex-start !important; }
    .lg\:text-left { text-align: left !important; }
    .lg\:max-w-2xl { max-width: 42rem !important; }
    .lg\:max-w-xl { max-width: 36rem !important; }
    .lg\:mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
}

/* Custom breakpoints for Donate Description exact line counts */
@media (min-width: 820px) and (max-width: 1023px) {
    .donate-desc {
        font-size: 16.5px !important;
        max-width: 100% !important;
    }
}
@media (min-width: 1024px) and (max-width: 1279px) {
    .donate-desc {
        font-size: 15.5px !important;
        max-width: 100% !important;
    }
}

/* Custom adjustment for 1920x1080 screen size */
@media (min-width: 1920px) {
    .donate-blue-box {
        margin-left: 75px !important;
        margin-right: 75px !important;
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
    .donate-desc {
        font-size: 17.5px !important;
        max-width: 100% !important;
    }
    .hero-desc {
        text-align: justify !important;
        text-align-last: center !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }
    #about .container {
        max-width: 1600px !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.02em !important;
        letter-spacing: -0.015em !important;
        font-size: 1.12rem !important;
        line-height: 1.65 !important;
    }
    #about .group:nth-of-type(3) p {
        font-size: 1.15rem !important;
        letter-spacing: -0.012em !important;
        word-spacing: -0.012em !important;
    }
}

/* Custom adjustment for iPad 1024x1323 screen size hero description */
@media (width: 1024px) {
    .hero-desc {
        text-align: justify !important;
        text-align-last: center !important;
        max-width: 760px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Home gallery: larger cards only on phones */
@media (max-width: 767px) {
    #gallery-track img {
        height: 16rem;
    }
}

/* Phone view hero description: justify, larger font, 6 lines */
@media (max-width: 767px) {
    .hero-desc {
        text-align: center !important;
        font-size: 16px !important;
        line-height: 1.6 !important;
        max-width: 88% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Fix for 402px phone: widen container so no single word on last line */
@media (max-width: 409px) {
    .hero-desc {
        max-width: 100% !important;
        font-size: 16px !important;
    }
}

/* Laptop 1280x800 hero description: justify, 2 lines */
@media (min-width: 1280px) and (max-width: 1399px) {
    .hero-desc {
        text-align: justify !important;
        text-align-last: center !important;
        font-size: 22px !important;
        max-width: 1100px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }
}

/* Custom adjustment for iPad 820x1137 screen size only */
@media (width: 820px) {
    .max-w-7xl h1 {
        font-size: 3.5rem !important;
    }
    .max-w-7xl h1 span {
        white-space: nowrap !important;
    }
    .max-w-7xl div.flex {
        flex-direction: row !important;
        gap: 1rem !important;
    }
    .max-w-7xl div.flex a {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        font-size: 0.875rem !important;
        width: auto !important;
        white-space: nowrap !important;
    }
    /* Team Card adjustments for iPad 820px screen width */
    .team-card {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    .team-desc {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
    }
    /* Mission, Vision, and Value Card description overrides for iPad layout */
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.02em !important;
        letter-spacing: -0.025em !important;
        font-size: 1.1rem !important;
        line-height: 1.62 !important;
    }
}

/* Justify text in Blog Modal Body */
#modal-body-content,
#modal-body-content p,
#modal-body-content li {
    text-align: justify !important;
}

/* Tighten vertical spacing in Blog Modal content */
#modal-body-content br {
    display: none !important;
}
#modal-body-content p {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
}
#modal-body-content h3 {
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
    font-size: 1.1rem !important;
}
#modal-body-content ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}
#modal-body-content ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}
#modal-body-content li {
    display: list-item !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
}

/* Larger screens get standard sized body copy */
@media (min-width: 1024px) {
    #modal-body-content p,
    #modal-body-content li {
        font-size: 15.5px !important;
    }
    #modal-body-content h3 {
        font-size: 1.25rem !important;
    }
}

/* Force left-alignment on blog card headings */
.blog-card h4,
.blog-card p.text-gray-500 {
    text-align: left !important;
}

/* Mobile & Tablet Blog Modal Scroll Optimization */
#blog-modal-content {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
}
#blog-modal-content > div:first-child {
    height: 38vh !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}
#blog-modal-content > div:last-child {
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
}
#blog-modal-content .overflow-y-auto {
    overflow-y: visible !important;
}

/* Desktop Blog Modal Split Scrolling */
@media (min-width: 1024px) {
    #blog-modal-content {
        flex-direction: row !important;
        overflow: hidden !important;
        height: 80vh !important;
    }
    #blog-modal-content > div:first-child {
        height: 100% !important;
        width: 50% !important;
    }
    #blog-modal-content > div:last-child {
        height: 100% !important;
        width: 50% !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    #blog-modal-content .overflow-y-auto {
        overflow-y: auto !important;
    }
}

/* Corrections for 1920x1080 Screen Size (min-width: 1500px) */
@media (min-width: 1500px) {
    /* Team Card adjustments for desktop 1920x1080 screen size */
    .team-card {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    .team-card .team-desc {
        font-size: 0.92rem !important;
        line-height: 1.65 !important;
        text-align: justify !important;
        text-align-last: center !important;
    }

    /* Faith Card adjustments for desktop 1920x1080 screen size */
    .faith-container {
        max-width: 1380px !important;
    }
    .faith-card {
        padding-left: 3.5rem !important;
        padding-right: 3.5rem !important;
    }
    .faith-quote {
        font-size: 2.28rem !important;
        line-height: 1.65 !important;
        text-align: justify !important;
    }

    /* Adjust grid columns and spacing between sections */
    footer .grid {
        display: grid !important;
        grid-template-columns: 1.25fr 0.95fr 0.8fr !important;
        gap: 5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    footer div.border-t {
        padding-top: 1.5rem !important;
    }
    
    /* Reduce space from the bottom */
    footer {
        padding-bottom: 2.25rem !important;
    }
    
    /* Increase description font size, justify, and limit to 3 lines */
    .footer-desc {
        font-size: 1.15rem !important;
        line-height: 1.8rem !important;
        max-width: 32rem !important;
        text-align: justify !important;
    }
    
    /* Increase email text font size */
    .footer-email {
        font-size: 1.25rem !important;
        line-height: 1.8rem !important;
    }

    /* Custom adjustments for Donation Page at 1920x1080 */
    .donation-quote-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 3.5rem 3rem !important;
    }
    .donation-quote-text {
        font-size: 1.65rem !important;
        white-space: nowrap !important;
        text-align: left !important;
    }
    .donation-quote-author {
        text-align: left !important;
        margin-top: 1rem !important;
        font-size: 1.05rem !important;
    }

    .donate-hero-section {
        height: 88vh !important;
    }
    .donate-hero-section .hero-title {
        font-size: 6.5rem !important;
        line-height: 1.15 !important;
    }
    .donate-hero-section .hero-title br {
        display: none !important;
    }
    .donate-hero-section .hero-desc {
        max-width: 1200px !important;
        font-size: 1.5rem !important;
        line-height: 1.75 !important;
        text-align: center !important;
        text-align-last: center !important;
    }
    .donate-hero-section img {
        object-position: center 18% !important;
    }
}

/* Align Quick Links to the left everywhere */
footer .grid > div:last-child {
    text-align: left !important;
}
footer .grid > div:last-child ul {
    text-align: left !important;
}
footer .grid > div:last-child h4 {
    text-align: left !important;
}

/* Ensure footer has enough padding on mobile so the floating action button doesn't hide text */
@media (max-width: 1024px) {
    footer {
        padding-bottom: 6rem !important;
    }
}

/* Phone view adjustments for footer bottom section and sticky buttons */
@media (max-width: 767px) {
    footer {
        padding-bottom: 5.5rem !important;
    }
    
    footer div.border-t.flex-col-reverse {
        gap: 1rem !important;
        padding-top: 1.5rem !important;
    }
    
    footer div.border-t.flex-col-reverse > div:first-child {
        font-size: 0.65rem !important; /* Increase copyright text size */
        line-height: 1.5 !important;
    }
    
    footer div.border-t.flex-col-reverse > div:last-child a {
        font-size: 0.65rem !important; /* Increase links text size */
        line-height: 1.5 !important;
    }

    /* Adjust floating buttons to fit neatly on mobile */
    #dynamic-action-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        min-width: 140px !important;
        padding: 0.5rem 1rem !important;
    }
    
    #chatbot-toggle-btn {
        bottom: 4.5rem !important;
        right: 1rem !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    #custom-chat-widget {
        bottom: 8.5rem !important;
        right: 1rem !important;
    }
}

/* Ensure navbar background colors are never purged and always apply consistently across all pages */
.bg-\[\#002366\]\/90 {
    background-color: rgba(0, 35, 102, 1) !important;
}
.bg-\[\#002366\]\/95 {
    background-color: rgba(0, 35, 102, 1) !important;
}

/* Support Card background gradient override to fix uncompiled Tailwind gradient classes */
.support-card-bg {
    background: linear-gradient(135deg, #0234A2, #002366) !important;
}

/* Keep bank transfer detail rows aligned and readable on tablet widths */
@media (min-width: 768px) and (max-width: 1023px) {
    .bank-detail-row {
        display: grid !important;
        grid-template-columns: minmax(86px, 1fr) minmax(0, 1.35fr) !important;
        column-gap: 0.9rem !important;
        align-items: start !important;
    }

    .bank-detail-row span:first-child {
        line-height: 1.35 !important;
    }

    .bank-detail-value {
        text-align: right !important;
        line-height: 1.35 !important;
        overflow-wrap: anywhere;
    }
}



/* Laptop View (1024px to 1439px) Left Spacing Correction */
@media (min-width: 1024px) and (max-width: 1439px) {
    footer .container {
        padding-left: 4rem !important;
        padding-right: 4rem !important;
    }
    .donation-heading {
        white-space: nowrap !important;
    }
    .donation-quote {
        font-size: 1.3rem !important;
        white-space: normal !important;
    }
}

/* Shifting footer links left on desktop/laptop to prevent overlap with the floating action button */
@media (min-width: 1024px) and (max-width: 1750px) {
    footer div.border-t.flex-col-reverse > div:last-child {
        padding-right: 11rem !important;
    }
}

/* Specific Laptop View (1280px to 1399px) Journey Section Corrections */
@media (min-width: 1280px) and (max-width: 1399px) {
    .journey-quote {
        font-size: 1.45rem !important;
        white-space: nowrap !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 2.5rem !important;
    }
    .journey-heading {
        font-size: 2.5rem !important;
        white-space: nowrap !important;
    }
    /* Team Card adjustments for laptop 1280x800 screen size */
    .team-card {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
    }
    .team-desc {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }
    /* Faith Card adjustments for laptop 1280x800 screen size */
    .faith-container {
        max-width: 1220px !important;
    }
    .faith-card {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    .faith-quote {
        font-size: 2.08rem !important;
        line-height: 1.6 !important;
        text-align: justify !important;
    }
    /* Increase nav menu text size on 1280px-1399px screen size */
    nav .hidden.xl\:flex a,
    nav .hidden.xl\:flex button {
        font-size: 0.90rem !important;
    }
    /* Card grid styles moved to general min-width: 640px media query */
    /* Increase filter buttons font size and padding */
    #year-filters button {
        font-size: 0.85rem !important;
        padding-left: 2.2rem !important;
        padding-right: 2.2rem !important;
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
    }
    /* Mission, Vision, and Value Card description overrides for 1280x800 layout */
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.02em !important;
        letter-spacing: -0.015em !important;
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
    }
    .donation-heading {
        font-size: 2.3rem !important;
        white-space: nowrap !important;
    }
}

/* Mobile Team Card description overrides to prevent excessive word spacing in justified text */
@media (max-width: 767px) {
    .team-desc {
        font-size: 16px !important;
        word-spacing: -0.02em !important;
        letter-spacing: -0.01em !important;
    }
}

/* Specific iPhone 17 View (402px width) Team Card Corrections for Card 1 and 2 */
@media (width: 402px) {
    .team-card:nth-of-type(1),
    .team-card:nth-of-type(2) {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    .team-card:nth-of-type(1) .team-desc,
    .team-card:nth-of-type(2) .team-desc {
        font-size: 14px !important;
        word-spacing: -0.03em !important;
        letter-spacing: -0.01em !important;
        text-align: justify !important;
        text-align-last: center !important;
    }
}

/* Mobile About Hero Description Font Increase & Hero Section Fix */
@media (max-width: 639px) {
    main > section:first-of-type {
        align-items: flex-start !important;
        padding-top: 110px !important;
    }
    .about-hero-desc {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 2rem !important;
    }
    main > section:first-of-type h1 {
        font-size: 2.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    .journey-quote {
        font-size: 1.30rem !important;
        white-space: nowrap !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        padding-bottom: 2.2rem !important;
        letter-spacing: -0.015em !important;
    }
    /* Faith Card Mobile adjustments for 440px screen width to fit in 5 lines */
    .faith-card {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
    }
    .faith-quote {
        font-size:1.50rem !important;
        line-height: 1.6 !important;
    }
}

/* Infinite Marquee Animation for Ticker Strips */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}
@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Mobile spacing adjustments for Happy Tails adopted dogs cards */
@media (max-width: 639px) {
    /* Reduce vertical gap between dog cards on mobile */
    main > section.container.mx-auto.px-6.py-12 > div.grid {
        row-gap: 2.2rem !important;
    }
    /* Reduce spacing between dog photo and dog name on mobile */
    main > section.container.mx-auto.px-6.py-12 > div.grid > div > div.relative.w-52 {
        margin-bottom: 1.25rem !important;
    }
    /* Reduce spacing between description and button on mobile */
    main > section.container.mx-auto.px-6.py-12 > div.grid > div > p.text-muted-foreground {
        margin-bottom: 1.1rem !important;
    }
}

/* Overrides for Medical Rescues CTA banner on 1920x1080 screen size */
@media (min-width: 1900px) {
    /* Reduce width of the yellow card container */
    main section.container > div.bg-primary {
        max-width: 1080px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    /* Keep the heading on a single line */
    main section.container > div.bg-primary h2 {
        white-space: nowrap !important;
        font-size: 2.85rem !important;
    }
    /* Limit description text width to spread into exactly 2 lines */
    main section.container > div.bg-primary p {
        max-width: 820px !important;
        font-size: 1.15rem !important;
        line-height: 1.6 !important;
    }
}

/* Centering grid items when there are few items on tablet, iPad, and desktop views */
@media (min-width: 640px) {
    #rescues-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 3rem 2.2rem !important;
    }
    #rescues-grid > div {
        width: 270px !important;
        flex-shrink: 0 !important;
    }
    /* Card text styling for tablet/desktop */
    #rescues-grid h3 {
        font-size: 1.45rem !important;
        margin-bottom: 0.35rem !important;
    }
    #rescues-grid .text-muted-foreground.uppercase {
        font-size: 0.8rem !important;
    }
}

/* Justified text alignment inside Sponsorship cards */
.sponsorship-grid p.text-muted-foreground {
    text-align: justify !important;
    font-size: 0.95rem !important;
    letter-spacing: -0.015em !important;
}

/* Style headings for Sponsorship cards */
.sponsorship-grid h3 {
    font-size: 1.35rem !important;
    letter-spacing: -0.02em !important;
}

@media (min-width: 1024px) {
    .sponsorship-grid h3 {
        white-space: nowrap !important;
    }
}

/* Specific iPad Air 11" Portrait View (820px width) Sponsorship Card corrections */
@media (width: 820px) {
    /* Keep 3-column grid with tighter gaps */
    .sponsorship-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem !important;
    }
    /* Reduce internal card padding */
    .sponsorship-grid > div {
        padding: 0.75rem !important;
    }
    /* Reduce section container side padding */
    section.py-20 > div.container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Adjust heading size to fit narrower cards */
    .sponsorship-grid h3 {
        font-size: 1.1rem !important;
        white-space: normal !important;
        letter-spacing: -0.02em !important;
    }
    /* Style paragraphs cleanly */
    .sponsorship-grid p.text-muted-foreground {
        font-size: 0.85rem !important;
        line-height: 1.55 !important;
        text-align: justify !important;
        letter-spacing: normal !important;
    }
}

/* General style for Mission, Vision, and Value Card descriptions to ensure justify alignment across all screen sizes */
#about .group p {
    text-align: justify !important;
    text-align-last: left !important;
}

/* General style for Our Journey description to ensure left alignment across all screen sizes */
.journey-desc {
    text-align: left !important;
    font-size: 1.6rem !important;
}

@media (max-width: 767px) {
    .journey-desc {
        text-align: left !important;
        font-size: 1.5rem !important;
    }
}

/* Device-specific overrides for Mission, Vision, and Value Card descriptions */


/* 1. iPhone 16/15 Plus, 15/14 Pro Max portrait style view (430px width) */
@media (width: 430px) {
    #about .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #about .group {
        width: 100% !important;
        max-width: 100% !important;
    }
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.015em !important;
        letter-spacing: -0.02em !important;
        font-size: 1.1rem !important;
        line-height: 1.62 !important;
    }
}

/* 2. iPad Pro 12.9" or iPad Air 13" portrait view (1024px width) */
@media (width: 1024px) {
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.015em !important;
        letter-spacing: -0.012em !important;
        font-size: 1.1rem !important;
        line-height: 1.65 !important;
    }
}

/* 3. iPhone 17 style portrait view (402px width) */
@media (width: 402px) {
    #about .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #about .group {
        width: 100% !important;
        max-width: 100% !important;
    }
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.02em !important;
        letter-spacing: -0.025em !important;
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
    }
    #about .group:nth-of-type(3) p {
        letter-spacing: -0.04em !important;
        word-spacing: -0.025em !important;
        line-height: 1.55 !important;
    }
}

/* 4. Google Pixel / Samsung style mobile view (440px width) */
@media (width: 440px) {
    #about .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #about .group {
        width: 100% !important;
        max-width: 100% !important;
    }
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.015em !important;
        letter-spacing: -0.02em !important;
        font-size: 1.1rem !important;
        line-height: 1.62 !important;
    }
}

/* 5. iPhone 12 Pro portrait style view (390px width) */
@media (width: 390px) {
    #about .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #about .group {
        width: 100% !important;
        max-width: 100% !important;
    }
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.015em !important;
        letter-spacing: -0.02em !important;
        font-size: 1.1rem !important;
        line-height: 1.62 !important;
    }
}

/* 6. iPhone XR portrait style view (414px width) */
@media (width: 414px) {
    #about .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #about .group {
        width: 100% !important;
        max-width: 100% !important;
    }
    #about .group > div:nth-child(2) {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    #about .group p {
        text-align: justify !important;
        text-align-last: left !important;
        word-spacing: -0.015em !important;
        letter-spacing: -0.02em !important;
        font-size: 1.1rem !important;
        line-height: 1.62 !important;
    }
}

/* Dog Details Modal Custom Styles to fix uncompiled Tailwind classes */
#dog-modal {
    z-index: 9999 !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

#dog-modal-content {
    max-width: 672px !important;
    width: 100% !important;
    border-radius: 2.5rem !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
}

.dog-modal-header {
    position: relative !important;
    height: 256px !important;
    flex-shrink: 0 !important;
}

@media (min-width: 640px) {
    .dog-modal-header {
        height: 320px !important;
    }
}

#dog-modal-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.dog-modal-gradient {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%) !important;
    z-index: 10 !important;
}

#close-dog-modal {
    position: absolute !important;
    top: 1.25rem !important;
    right: 1.25rem !important;
    z-index: 50 !important;
}

.dog-modal-title-container {
    position: absolute !important;
    bottom: 1.5rem !important;
    left: 2rem !important;
    right: 2rem !important;
    z-index: 20 !important;
}

.dog-modal-body {
    padding: 2rem !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    color: #334155 !important;
}

@media (min-width: 640px) {
    .dog-modal-body {
        padding: 2.5rem !important;
    }
}

.dog-modal-meta {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
}

#dog-modal-desc {
    font-size: 1rem !important;
    line-height: 1.625 !important;
    margin: 0 !important;
    text-align: justify !important;
}

@media (min-width: 640px) {
    #dog-modal-desc {
        font-size: 1.125rem !important;
        text-align: justify !important;
    }
}

/* Global Loader Animations */
@keyframes loaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}

/* --- Global Loader Styles --- */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #FAF9F5;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#global-loader.opacity-0 {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Background Wave Layout */
.loader-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    pointer-events: none;
    z-index: 1;
}

.loader-waves .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loader-waves .wave-1 {
    animation: waveMove 12s linear infinite alternate;
}

.loader-waves .wave-2 {
    animation: waveMove 8s linear infinite alternate;
    opacity: 0.8;
}

@keyframes waveMove {
    0% { transform: translateX(-2%); }
    100% { transform: translateX(2%); }
}

/* Translucent scattered paw prints in background */
.loader-bg-paws {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-paw {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(0, 102, 255, 0.04);
    user-select: none;
}

.bg-paw.paw-1 { top: 15%; left: 10%; transform: rotate(-15deg); }
.bg-paw.paw-2 { top: 25%; right: 12%; transform: rotate(20deg); }
.bg-paw.paw-3 { bottom: 30%; left: 15%; transform: rotate(10deg); }
.bg-paw.paw-4 { bottom: 20%; right: 8%; transform: rotate(-25deg); }

/* Center Container */
.loader-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Rotating Arc & Circle Container */
.loader-spinner-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.loader-spinner-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes rotateArc {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inner Logo Container */
.loader-logo-wrapper {
    position: absolute;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.loader-logo-overlay {
    position: absolute;
    width: 280px;
    height: 148px; /* 1.88 ratio of 810x430 canvas */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

/* Text Styles */
.loader-text-group {
    text-align: center;
    margin-bottom: 2rem;
}

.loader-title {
    color: #002366;
    font-family: sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    margin: 0;
    line-height: 1.2;
}

.loader-subtitle {
    color: #4A5568;
    font-family: sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0.4rem 0 0 0;
    opacity: 0.9;
}

.loader-status {
    color: #0066FF;
    font-family: sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-top: 1.5rem;
    animation: pulseStatus 1.5s infinite ease-in-out;
}

@keyframes pulseStatus {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Horizontal Progress Bar Container */
.loader-progress-container {
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.loader-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: #E2E8F0;
    border-radius: 9999px;
    position: relative;
    overflow: visible; /* Let paw knob overflow vertically */
}

.loader-progress-fill {
    height: 100%;
    width: 0%; /* Dynamic */
    background-color: #0066FF;
    border-radius: 9999px;
    transition: width 0.1s linear;
}

.loader-progress-paw-knob {
    position: absolute;
    top: 50%;
    left: 0%; /* Dynamic matching fill width */
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background-color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 0 0 3px rgba(0, 102, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066FF;
    transition: left 0.1s linear;
}

.paw-icon-svg {
    width: 20px;
    height: 20px;
    color: #0066FF;
    fill: #0066FF;
}

.loader-progress-caption {
    color: #718096;
    font-family: sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.8rem;
    letter-spacing: 0.02em;
}

/* Heart Icon Container */
.loader-heart-container {
    margin-top: -0.5rem;
}

.loader-heart-icon {
    width: 16px;
    height: 16px;
    color: #0066FF;
    animation: heartBeat 1.2s infinite cubic-bezier(0.215, 0.610, 0.355, 1);
}

@keyframes heartBeat {
    0% { transform: scale(1.0); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1.0); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1.0); }
    100% { transform: scale(1.0); }
}

/* Mobile scaling for Global Loader */
@media (max-width: 639px) {
    .loader-spinner-container {
        width: 200px;
        height: 200px;
        margin-bottom: 1.5rem;
    }
    .loader-logo-wrapper {
        width: 165px;
        height: 165px;
    }
    .loader-logo-overlay {
        width: 200px;
        height: 106px;
    }
    .loader-title {
        font-size: 1.35rem;
        letter-spacing: 0.1em;
    }
    .loader-subtitle {
        font-size: 0.6rem;
    }
    .loader-status {
        font-size: 0.75rem;
        margin-top: 1.25rem;
    }
    .loader-progress-container {
        width: 200px;
        margin-bottom: 1.5rem;
    }
}

/* Team description text styles */
.team-card .team-desc {
    font-size: 1.15rem !important;
    text-align: center !important;
}

/* For Standard Desktop */
@media (min-width: 1024px) {
    .team-card .team-desc {
        text-align: center!important;
        font-size: 1.25rem !important;
    }
}

@media (min-width: 1280px) {
    .team-card .team-desc {
        text-align: left !important;
        font-size: 1.30rem !important;
    }
}

/* For Extra Large Displays (e.g. 1440px and above, covers 27-inch monitors) */
@media (min-width: 1440px) {
    .team-card .team-desc {
        text-align: left !important;
        text-align-last: left !important;
        font-size: 1.25rem !important;
    }
}

/* For 2560px and above displays */
@media (min-width: 2560px) {
    .team-card .team-desc {
        text-align: left !important;
        text-align-last: center !important;
        font-size: 1.5rem !important;
    }
}

/* About Hero Section Spacing Fix */
.about-hero-section {
    min-height: 65vh;
    padding-top: 180px !important; /* Clear the nav bar on mobile */
    padding-bottom: 60px !important;
}

.about-hero-section img {
    object-position: center 15% !important;
}

@media (min-width: 768px) {
    .about-hero-section {
        min-height: 100vh;
        padding-top: 140px !important; /* Clear the nav bar and push down on desktop/laptop */
        padding-bottom: 0px !important;
    }
    .about-hero-section img {
        object-position: center 18% !important;
    }
}

/* Fix for iPad view (820x1137) */
@media screen and (min-width: 820px) and (max-width: 830px) {
    .about-hero-section {
        min-height: 500px !important; /* Reduce height so object-cover doesn't crop width as much */
        height: 500px !important;
        margin-top: 89px; /* Start exactly below the navbar */
        padding-top: 40px !important; /* Adjust padding to keep text centered */
    }
    .about-hero-section img {
        object-position: center top !important;
        object-fit: cover !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Fix for Laptop view (1280x800) */
@media screen and (min-width: 1260px) and (max-width: 1290px) {
    .about-hero-section {
        min-height: 720px !important; /* perfectly matches 16:9 aspect ratio */
        height: 720px !important;
        margin-top: 89px; /* Start exactly below the navbar */
        padding-top: 44px !important; /* Keep content centered */
    }
    .about-hero-section img {
        object-position: center top !important;
        object-fit: cover !important;
        width: 100% !important;
        height: 100% !important;
    }
}

@media (min-width: 1920px) {
    .about-hero-section h1 {
        font-size: 6.8rem !important;
    }
    .about-hero-section img {
        object-position: center 15% !important;
    }
}
@media (min-width: 1280px) {
    .about-hero-section h1 {
        font-size: 4.9rem !important;
    }
}

/* Custom class for Mission, Vision, and Values Cards outline and hover shadow */
.mission-card-outline {
    border: 2px solid #d99600 !important;
}
.mission-card-outline:hover {
    box-shadow: 0 10px 40px -10px rgba(2, 52, 162, 0.45) !important;
}

.hero-image-position {
    object-position: 80% 30% !important;
}
@media (min-width: 768px) {
    .hero-image-position {
        object-position: center 30% !important;
    }
}
@media (min-width: 1024px) and (max-width: 1440px) {
    .hero-image-position {
        object-position: center top !important;
    }
}

/* Prevent dog image cropping on mobile views by adjusting container aspect ratio */
@media (max-width: 767px) {
    .journey-img-container {
        aspect-ratio: 818/568 !important;
    }
}

/* Index Hero Section Spacing and Image Alignment for Laptop/Desktop */
@media (min-width: 768px) {
    .index-hero-section {
        min-height: 88vh !important; /* Increase the height of the hero section */
        margin-top: 89px !important; /* Start exactly below the navbar */
    }
    .index-hero-section img {
        object-position: center top !important; /* Align image from the top */
        object-fit: cover !important;
    }
}
