/* Aliceville Adult Family Home - Custom Styles */

:root {
    --priFont: 'Open Sans', sans-serif;
    --secFont: 'Gabarito', sans-serif;
    --priColor: #205a76; /* Brand Blue/Teal */
    --secColor: #7bb39a; /* Brand Sage */
    --terColor: #f4b25f; /* Brand Gold */
    --darkColor: #23313a;
    --lightColor: #f1f5f8;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--priFont);
    color: var(--darkColor);
    line-height: 1.8;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--secFont);
    font-weight: 800;
}

/* --- Bootstrap Overrides --- */
.bg-primary { background-color: var(--priColor) !important; }
.bg-secondary { background-color: var(--secColor) !important; }
.bg-dark { background-color: var(--darkColor) !important; }
.text-primary { color: var(--priColor) !important; }
.text-secondary { color: var(--secColor) !important; }
.text-ter { color: var(--terColor) !important; }

.btn-primary {
    background-color: var(--priColor) !important;
    border-color: var(--priColor) !important;
    color: var(--white) !important;
}
.btn-primary:hover {
    background-color: var(--darkColor) !important;
    transform: translateY(-3px);
}
.btn-secondary {
    background-color: var(--secColor) !important;
    border-color: var(--secColor) !important;
    color: var(--white) !important;
}
.btn-secondary:hover {
    background-color: var(--priColor) !important;
    transform: translateY(-3px);
}
.btn-ter {
    background-color: var(--terColor) !important;
    border-color: var(--terColor) !important;
    color: var(--darkColor) !important;
    font-weight: 700;
}
.btn-ter:hover {
    background-color: var(--white) !important;
    border-color: var(--white) !important;
    color: var(--priColor) !important;
    transform: translateY(-3px);
}

/* Override standard link blue */
a {
    color: var(--priColor);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--secColor); }

/* Section Spacing */
.section-padding { padding: 100px 0; }
@media (max-width: 768px) { 
    .section-padding { padding: 60px 0; } 
    .hero-content h1 { font-size: 1.8rem; }
    .hero-subheadline { font-size: 1rem; margin-bottom: 1rem; }
    .hero-text { font-size: 0.85rem; }
    .service-card { padding: 1.5rem 1rem; }
    .service-icon { width: 50px; height: 50px; font-size: 1.5rem; margin-bottom: 1rem; border-radius: 12px; }
}

/* Header & Nav */
.main-header {
    transition: var(--transition);
    width: 100%;
    z-index: 1000;
}

.top-bar { 
    background-color: var(--priColor); 
    font-size: 0.85rem; 
    font-weight: 600; 
    padding: 8px 0 !important; 
    transition: var(--transition);
}

@media (max-width: 991px) {
    .top-bar .container {
        justify-content: center !important;
        text-align: center;
    }
    .top-info, .top-contact {
        width: 100%;
        justify-content: center;
    }
}

.main-header.scrolled .top-bar {
    margin-top: -40px;
    opacity: 0;
}

.navbar { 
    padding: 1.5rem 0; 
    transition: all 0.4s ease; 
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.main-header.scrolled .navbar { 
    padding: 0.8rem 0; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.navbar-brand img {
    transition: all 0.4s ease;
}

.main-header.scrolled .navbar-brand img { 
    height: 65px !important; 
}

.nav-link {
    font-family: var(--secFont);
    font-weight: 700;
    color: var(--darkColor) !important;
    padding: 0.5rem 1.5rem !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background: var(--terColor);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover, .nav-link.active { 
    color: var(--priColor) !important; 
}

.nav-link:hover i {
    transform: translateY(-2px);
    opacity: 1;
    color: var(--priColor);
}

/* Enhancing Nav Button */
.navbar .btn-primary {
    border-radius: 50px;
    padding: 12px 28px !important;
    font-family: var(--secFont);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(32, 90, 118, 0.2);
    border: none !important;
    background: linear-gradient(135deg, var(--priColor) 0%, #3a7a96 100%) !important;
}

.navbar .btn-primary:hover {
    box-shadow: 0 12px 25px rgba(32, 90, 118, 0.3);
    background: linear-gradient(135deg, #3a7a96 0%, var(--priColor) 100%) !important;
}

@media (max-width: 991px) {
    .navbar { padding: 1rem 0; }
    .navbar-collapse {
        background: white;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    }
    .navbar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
    .nav-item {
        width: 50%; /* Two columns */
        padding: 0 5px;
    }
    .nav-item:last-child {
        width: 100%; /* Button takes full width at the bottom */
        margin-top: 15px !important;
        text-align: center;
    }
    .nav-link { 
        padding: 0.8rem 0 !important; 
        font-size: 0.8rem !important;
        justify-content: center;
    }
    .nav-link::after { left: 0; right: 0; bottom: 5px; }
}

/* Hero Sections */
.hero-section {
    min-height: 90vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
    padding: 120px 0;
}
.hero-content { padding: 50px 0; }
.hero-btns { margin-top: 30px; }
.hero-content h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 0.8rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.4); line-height: 1.2; }
.hero-content h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.8rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.4); line-height: 1.2; }
.hero-subheadline { color: var(--terColor); font-weight: 700; font-size: clamp(0.95rem, 1.3vw, 1.1rem); text-transform: none; margin-bottom: 0.8rem; letter-spacing: 0; }
.hero-text { font-size: clamp(0.85rem, 1.1vw, 1rem); max-width: 800px; line-height: 1.5; margin-bottom: 1.5rem !important; }

.internal-hero { padding: 180px 0 120px; background-size: cover; background-position: center; color: var(--white); text-align: center; position: relative; }
.internal-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 1; }
.internal-hero .container { position: relative; z-index: 2; }
.internal-hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); text-shadow: 2px 2px 15px rgba(0,0,0,0.5); }

/* Hero Slider */
.hero-slider .carousel-item {
    height: 90vh;
    min-height: 650px;
    background-size: cover;
    background-position: center;
}
.hero-slider .hero-container {
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--white);
}

/* Trust Strip */
.trust-strip { background: var(--white); box-shadow: 0 20px 50px rgba(0,0,0,0.12); margin-top: -40px; border-radius: 25px; overflow: hidden; position: relative; z-index: 10; }
.trust-item { padding: 20px 5px; font-weight: 800; text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.3px; border-right: 1px solid #f0f0f0; text-align: center; line-height: 1.2; }
.trust-item:last-child { border-right: none; }
.trust-item i { font-size: 1.6rem; color: #205A76 !important; margin-bottom: 12px; display: block; }
@media (max-width: 991px) {
    .trust-strip { margin-top: 0; border-radius: 0; }
    .trust-item { border-bottom: 1px solid #f0f0f0; padding: 15px 5px; font-size: 0.6rem; }
    .trust-item:nth-child(even) { border-right: none; }
}

/* Redesigned Welcome Collage */
.welcome-collage {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
}

.collage-item {
    position: absolute;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collage-item:hover {
    transform: translateY(-15px) scale(1.02);
    z-index: 10 !important;
    box-shadow: 0 40px 80px rgba(32, 90, 118, 0.25);
}

.item-main {
    width: 75%;
    height: 70%;
    top: 0;
    left: 0;
    z-index: 2;
    border: 8px solid var(--white);
}

.item-secondary {
    width: 55%;
    height: 50%;
    bottom: 5%;
    right: 0;
    z-index: 3;
    border: 10px solid var(--white);
}

.item-accent {
    width: 40%;
    height: 35%;
    top: 15%;
    right: -5%;
    z-index: 1;
    filter: brightness(0.9);
}

.collage-bg-shape {
    position: absolute;
    width: 80%;
    height: 80%;
    background: var(--terColor);
    opacity: 0.1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 0;
    transform: rotate(-15deg);
    left: -10%;
}

@media (max-width: 991px) {
    .welcome-collage { height: 450px; margin-top: 50px; }
    .item-main { width: 80%; }
    .item-secondary { width: 60%; }
    .item-accent { display: none; }
}

/* Floating Contact & Back to Top - FIXED CSS */
.floating-contact {
    position: fixed !important;
    right: 20px !important;
    bottom: 90px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.fc-item {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--white) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    font-size: 20px !important;
    transition: var(--transition) !important;
}
.fc-item:hover { transform: scale(1.1) rotate(5deg) !important; color: var(--white) !important; }
.fc-item.phone { background-color: var(--priColor) !important; }
.fc-item.whatsapp { background-color: #25d366 !important; }
.fc-item.email { background-color: var(--secColor) !important; }

#back-to-top {
    position: fixed !important;
    right: 20px !important;
    bottom: 25px !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 9999 !important;
    display: none;
    border-radius: 50% !important;
    font-size: 18px !important;
}

/* Accessibility */
.accessibility-widget { position: fixed !important; left: 20px !important; bottom: 25px !important; z-index: 9999 !important; }
.accessibility-widget #acc-toggle { width: 50px; height: 50px; border-radius: 50%; font-size: 18px !important; }
.acc-menu { position: absolute; bottom: 65px; left: 0; background: var(--white); width: 260px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.hide { display: none !important; }

@media (max-width: 576px) {
    .floating-contact { right: 15px !important; bottom: 85px !important; }
    #back-to-top { right: 15px !important; bottom: 20px !important; }
    .accessibility-widget { left: 15px !important; bottom: 20px !important; }
    .fc-item, #back-to-top, .accessibility-widget #acc-toggle { width: 45px !important; height: 45px !important; font-size: 18px !important; }
}

/* Footer & CTA */
.footer-cta-bar { background-color: var(--secColor) !important; padding: 80px 0; color: white !important; text-align: center; }
.footer-cta-bar h2 { color: white !important; font-weight: 800; margin-bottom: 2rem !important; }
.footer-cta-bar p { font-size: 1.25rem; opacity: 0.95; margin-bottom: 2.5rem !important; }

.main-footer { background-color: var(--darkColor); color: white; margin-top: 0; }
.footer-content { padding-top: 60px; padding-bottom: 60px; }
.main-footer h3.h5 { margin-top: 0; margin-bottom: 2.5rem; position: relative; padding-bottom: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.main-footer h3.h5::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--secColor); }

@media (max-width: 768px) {
    .footer-links-cols { display: flex; flex-wrap: wrap; }
    .footer-links-cols li { width: 50%; }
}

.footer-social { display: flex; gap: 15px; margin-top: 25px; }
.footer-social a { 
    width: 45px; height: 45px; background: rgba(255,255,255,0.08); 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; color: white; transition: var(--transition); 
    font-size: 1.2rem;
}
.footer-social a:hover { background: var(--secColor); transform: translateY(-5px); color: white; }

.footer-partners { display: flex; align-items: center; gap: 25px; margin-top: 40px; }
.footer-partners img { height: 50px; filter: grayscale(1) brightness(2); opacity: 0.5; transition: var(--transition); }
.footer-partners a:hover img { opacity: 1; filter: none; transform: scale(1.05); }

/* Who We Are a Great Fit For Section */
.fit-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.fit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../Images/nh-EZDWLXW.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.05; /* Very faint */
    z-index: -1;
}

.rounded-25 { border-radius: 25px !important; }

.fit-section .shadow-sm {
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.fit-section .shadow-sm:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

@media (max-width: 768px) {
    .h4-lg { font-size: 1.1rem; }
    .fit-desc { font-size: 0.75rem !important; line-height: 1.4; }
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
}

.gallery-link {
    transition: var(--transition);
}

.gallery-link img {
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-link img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 90, 118, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.5);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

/* FAQ Accordion Styles */
.faq-accordion .accordion-item {
    border: none;
    margin-bottom: 1.5rem;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.faq-accordion .accordion-item:hover {
    box-shadow: 0 15px 35px rgba(32, 90, 118, 0.1);
    transform: translateY(-3px);
}

.faq-accordion .accordion-button {
    padding: 1.5rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--darkColor);
    background-color: var(--white);
    border: none;
    box-shadow: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--priColor);
    background-color: rgba(32, 90, 118, 0.03);
}

.faq-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2323313a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-size: 1.25rem;
    transition: transform 0.3s ease;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23205a76'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

.faq-accordion .accordion-body {
    padding: 0 2rem 2rem;
    color: #6c757d;
    line-height: 1.8;
    background-color: rgba(32, 90, 118, 0.03);
}

/* Payment Options Section */
.payment-options {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.payment-options::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../Images/nh-3T2PU5T.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.04;
    z-index: -1;
}

.payment-options .shadow-sm {
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.payment-options .shadow-sm:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(32, 90, 118, 0.1) !important;
}

/* Utility Classes */
.bg-light { background-color: var(--lightColor) !important; }
.bg-light-pri { background-color: rgba(32, 90, 118, 0.08) !important; }
.text-pri { color: var(--priColor) !important; }
.text-sec { color: var(--secColor) !important; }
.grayscale { filter: grayscale(1); }
.section-tag { color: var(--secColor); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 1.5rem; }
.rounded-25 { border-radius: 25px; }

/* Custom Circles & Icons */
.icon-circle {
    transition: var(--transition);
}
.icon-circle:hover {
    transform: scale(1.1);
    background-color: var(--priColor) !important;
    color: var(--white) !important;
}

/* Lightbox */
.gallery-lightbox { display: none; position: fixed; z-index: 3000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.lightbox-content { max-width: 90%; max-height: 80vh; border: 10px solid var(--white); border-radius: 10px; }
.close-lightbox { position: absolute; top: 20px; right: 30px; color: var(--white); font-size: 40px; cursor: pointer; }

/* Home Preview Cards */
.home-preview-card { transition: var(--transition); }
.home-preview-card:hover { transform: translateY(-10px); }
.home-preview-card:hover img { transform: scale(1.1); }
.home-preview-card img { transition: var(--transition); }

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    z-index: 2;
}

/* Service Cards */
.service-card { padding: 3rem 2rem; border-radius: 30px; background: var(--white); border: 1px solid rgba(0,0,0,0.05); transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-15px); box-shadow: 0 20px 50px rgba(32, 90, 118, 0.15); }
.service-card.bg-primary { background: var(--priColor) !important; color: white !important; }
.service-icon { width: 90px; height: 90px; font-size: 3rem; background: var(--priColor); border-radius: 25px; color: white; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; flex-shrink: 0; }
.service-card p { display: block !important; visibility: visible !important; opacity: 1 !important; }

@media (max-width: 768px) {
    .service-card { padding: 1.5rem 1rem; }
    .service-card h3 { font-size: 0.95rem; margin-bottom: 0.5rem !important; }
    .service-card p { font-size: 0.75rem; margin-bottom: 1rem !important; }
    .service-icon { width: 50px; height: 50px; font-size: 1.5rem; margin-bottom: 1rem; border-radius: 12px; }
}

@media (min-width: 1600px) { .container { max-width: 100% !important; padding-left: 100px; padding-right: 100px; } }

/* --- Accessibility Modes --- */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}
body.dark-mode .bg-light, 
body.dark-mode .section-padding,
body.dark-mode .bg-white,
body.dark-mode section:not(.bg-primary):not(.bg-secondary):not(.hero-slider),
body.dark-mode .service-card,
body.dark-mode .location-detail-card,
body.dark-mode .contact-form-card,
body.dark-mode .faq-item,
body.dark-mode .bg-light-soft {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
body.dark-mode .text-muted,
body.dark-mode .opacity-75,
body.dark-mode .opacity-90 {
    color: #b0b0b0 !important;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .text-pri, body.dark-mode .text-primary {
    color: #fff !important;
}
body.dark-mode .navbar {
    background-color: rgba(18, 18, 18, 0.95) !important;
}
body.dark-mode .nav-link {
    color: #fff !important;
}

/* High Contrast Mode */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}
body.high-contrast * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.high-contrast a, 
body.high-contrast button,
body.high-contrast .btn {
    color: #ffff00 !important; /* Yellow for interactive elements */
    border: 2px solid #ffff00 !important;
    background-color: #000 !important;
}
body.high-contrast .btn:hover {
    background-color: #ffff00 !important;
    color: #000 !important;
}
body.high-contrast img {
    filter: grayscale(1) contrast(1.5) !important;
}
