html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
}

:root {
    --primary-color: #4D7F85;
    --secondary-color: #564235;
    --light-color: #F5F0E8;
    --light-accent: #D4C9B9;
    --dark-text: #333333;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-text);
}

/* Header Styling */
.custom-navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    min-height: 130px;
}

.navbar-brand {
    font-weight: 500;
    color: var(--primary-color);
}

.nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    transition: color 0.3s ease;
    position: relative;
}

    .nav-link:hover, .nav-link.active {
        color: var(--primary-color) !important;
    }

        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 2px;
            background-color: var(--primary-color);
        }

.login-btn {
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 20px;
    padding: 8px 20px !important;
    font-weight: 500;
    margin-left: 8px;
}

    .login-btn:hover {
        background-color: #3c6469;
    }

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    background-image: linear-gradient(rgba(77, 127, 133, 0.7), rgba(77, 127, 133, 0.7)), url('/images/church-hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

    .hero-section h1 {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .hero-section p {
        font-size: 1.2rem;
        max-width: 700px;
        margin-bottom: 2rem;
    }

.explore-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .explore-btn:hover {
        background-color: #42322a;
        transform: translateY(-2px);
    }

/* Feature Boxes */
.feature-section {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.feature-box {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
    height: 300px;
    position: relative;
    background-color: #333;
}

    .feature-box:hover {
        transform: translateY(-5px);
    }

    .feature-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }

    .feature-box:hover img {
        opacity: 0.6;
    }

    .feature-box .feature-btn {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background-color: white;
        color: var(--dark-text);
        border: none;
        padding: 8px 25px;
        border-radius: 30px;
        font-weight: 500;
        transition: all 0.3s ease;
        text-decoration: none;
    }

        .feature-box .feature-btn:hover {
            background-color: var(--primary-color);
            color: white;
        }

/* Footer Styling */
footer {
    background-color: #333;
    color: #fff;
    padding-top: 3rem;
    margin-top: 0;
}

    footer h5 {
        color: var(--light-accent);
        font-weight: 600;
        margin-bottom: 1.2rem;
    }

    footer a {
        color: #ccc;
        transition: color 0.3s ease;
    }

        footer a:hover {
            color: var(--light-accent);
        }

    footer .social-icons i {
        font-size: 1.5rem;
        margin-right: 10px;
        transition: color 0.3s ease;
    }

    footer .social-icons a:hover i {
        color: var(--light-accent);
    }

.footer-copyright {
    background-color: #222;
    padding: 1rem 0;
    margin-top: 2rem;
}

.bg-primary {
    background: linear-gradient(rgba(77, 127, 133, 0.7), rgba(77, 127, 133, 0.7)) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }

        .hero-section h1 {
            font-size: 2.5rem;
        }

    .feature-box {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .desktop-break {
        display: block;
    }
}

.card-img-top {
    height: 200px; /* Or any preferred fixed height */
    object-fit: cover; /* Ensures the image is cropped rather than distorted */
    width: 100%; /* Maintain full width inside the card */
}


/* Hero section with background image */
.hero-section {
    position: relative;
    width: 100%;
    padding: 100px 0;
    text-align: center;
    color: white;
}

/* Semi-transparent overlay to ensure text readability */
.hero-overlay {
    padding: 60px 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for better text contrast */
    width: 100%;
}

/* For when we're using the background-image style */
.hero-section[style*="background-image"] {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Hero section text elements */
.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Explore button styling */
.explore-btn {
    background-color: #ffffff;
    color: #333;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .explore-btn:hover {
        background-color: #f8f9fa;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* Carousel styling for articles */
#articleCarousel {
    padding: 0 30px;
}

    #articleCarousel .carousel-inner {
        padding: 20px 0;
    }

    #articleCarousel .carousel-control-prev,
    #articleCarousel .carousel-control-next {
        width: 30px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }

    #articleCarousel .carousel-control-prev-icon,
    #articleCarousel .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }

    #articleCarousel .carousel-item {
        padding: 5px;
    }

/* Card styles improvements */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Limit text height in cards for consistency */
.card-body .card-text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 4.5rem;
}

/* Active badge styling */
.badge.bg-primary {
    background-color: #0d6efd !important;
}

/* Fix for carousel on smaller screens */
@media (max-width: 767.98px) {
    #articleCarousel .carousel-item {
        min-height: 420px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-overlay {
        padding: 40px 15px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }
}
