/* ============================================
   Moving Forward Sober Living - Modern Responsive
   ============================================ */

:root {
    --primary: #6b3a2a;
    --primary-dark: #4e2a1e;
    --primary-light: #f5ebe7;
    --accent: #c78c3c;
    --accent-hover: #b07a2e;
    --dark: #2c1e16;
    --dark-lighter: #4a3328;
    --light: #efe5de;
    --muted: #7a6a60;
    --border: #e8ddd6;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1), 0 8px 32px rgba(0,0,0,0.06);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
}

[ng-cloak] {
    display: none !important;
}

/* ---- Typography ---- */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    margin: 0;
    background: #e8ddd6;
}

.app-shell {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 40px rgba(0,0,0,0.12);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
}

.section-heading {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.heading-accent {
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 0 auto 1.5rem;
}

.heading-accent-light {
    background: rgba(255,255,255,0.5);
}

/* ---- Buttons ---- */

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.15s;
}

.btn-accent:hover, .btn-accent:focus {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

/* ---- Navbar ---- */

.navbar {
    background: var(--primary);
    padding: 0.6rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 1030;
}

.navbar-logo {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.brand-text {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    font-size: 0.95rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.call-btn-mobile {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ---- Hero Section ---- */

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 500px;
}

.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 500px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44,30,22,0.35) 0%, rgba(44,30,22,0.55) 50%, rgba(44,30,22,0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.hero-title {
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.hero-location {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hero-nav:hover {
    background: rgba(255,255,255,0.3);
}

.hero-nav-prev { left: 1rem; }
.hero-nav-next { right: 1rem; }

/* ---- Page Headers ---- */

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.page-header .lead {
    opacity: 0.85;
    font-size: 1.05rem;
}

/* ---- Sections ---- */

.section-light {
    background: var(--light);
}

.section-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.section-dark {
    background: var(--dark);
    color: #fff;
}

.section-cta {
    background: var(--primary-light);
}

/* ---- Home: What We Do ---- */

.check-icon {
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* ---- Home: Expect Cards ---- */

.expect-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.expect-card:hover {
    transform: translateY(-3px);
}

.expect-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.expect-card h5 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.expect-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0;
}

/* ---- Pricing Card ---- */

.pricing-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--primary);
}

.pricing-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.25rem;
}

.pricing-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.pricing-amount {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0.15rem 0;
}

.pricing-period {
    opacity: 0.75;
    font-size: 1rem;
}

.pricing-body {
    padding: 1.25rem;
}

.amenity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.amenity-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.amenity-list li:last-child {
    border-bottom: none;
}

.amenity-list li i {
    color: var(--primary);
    font-weight: 700;
}

/* ---- Resources ---- */

.resource-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    font-size: 0.8rem;
    white-space: nowrap;
    height: 100%;
}

.resource-link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ---- Mission ---- */

.mission-quote {
    padding: 1rem 2rem;
}

.quote-icon {
    color: var(--accent);
    opacity: 0.4;
}

.mission-text {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--dark);
    font-weight: 700;
}

.service-item {
    padding: 0.5rem 0.75rem;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    height: 100%;
}

.service-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* ---- Gallery ---- */

.nav-pills .nav-link {
    color: var(--dark);
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.gallery-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 1.5rem 0.75rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Lightbox */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-img {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ---- Rules ---- */

.rules-intro {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.rules-intro i {
    color: var(--accent);
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.rules-intro p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark);
    font-style: italic;
    line-height: 1.6;
}

.rules-list {
    counter-reset: none;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.15rem;
}

.rule-text {
    font-size: 0.85rem;
    line-height: 1.5;
}

.rule-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- Contact ---- */

.contact-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform 0.2s;
}

.contact-card:hover {
    transform: translateY(-3px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.contact-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-form .form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,107,74,0.15);
}

/* ---- Drug Guide ---- */

.classification-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: 100%;
    text-align: center;
}

.classification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-item {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.schedule-level {
    background: var(--primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Donate ---- */

.donate-heart {
    font-size: 4rem;
    color: var(--accent);
}

.donate-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform 0.2s;
}

.donate-card:hover {
    transform: translateY(-3px);
}

.donate-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 0.75rem;
}

/* ---- Footer ---- */

.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 0;
    margin-top: auto;
}

.footer-logo {
    height: 48px;
    width: auto;
    border-radius: 4px;
}

.footer-tagline {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

.footer-heading {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.footer a:hover {
    color: var(--accent);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.9rem;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 2rem 0 1rem;
}

.x-small {
    font-size: 0.7rem;
}

.footer .x-small {
    color: rgba(255,255,255,0.35);
}

.footer .x-small:hover {
    color: rgba(255,255,255,0.55);
}

.overlay-page {
    min-height: 60vh;
}

/* ---- Responsive ---- */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--primary-dark);
        margin: 0.5rem -0.75rem -0.6rem;
        padding: 1rem;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .navbar .nav-link {
        padding: 0.65rem 1rem;
        border-radius: var(--radius-sm);
    }

    .navbar .btn-accent {
        margin-top: 0.5rem;
        display: block;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .hero-carousel {
        min-height: 420px;
    }

    .hero-image {
        min-height: 420px;
    }

    .hero-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .hero-nav-prev { left: 0.5rem; }
    .hero-nav-next { right: 0.5rem; }

    .page-header {
        padding: 2rem 0 1.5rem;
    }

    .section-heading {
        font-size: 1.4rem;
    }

    .pricing-amount {
        font-size: 2.75rem;
    }

    .rule-item {
        padding: 0.75rem 1rem;
    }

    .rule-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .schedule-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer {
        text-align: center;
    }

    .footer-heading {
        margin-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-carousel {
        min-height: 360px;
    }

    .hero-image {
        min-height: 360px;
    }

    .expect-card {
        padding: 1.5rem 1rem;
    }

    .expect-icon {
        font-size: 2rem;
    }

    .gallery-img {
        aspect-ratio: 1;
    }
}
