/* Grace Site theme: layout (views/layouts/main.php) and home page (views/site/index.php) */

:root {
    --primary-color: #1a2a6c; /* Deep Navy */
    --accent-color: #b89550;  /* Soft Gold */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, .navbar-brand {
    font-family: 'Playfair Display', serif;
}

.navbar-brand-2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.2;
    min-width: 0;          /* allow the brand text to shrink instead of pushing the toggler off-screen */
}

/* Header must fit the viewport on phones; the hamburger must always stay visible */
.navbar > .container-fluid {
    flex-wrap: nowrap;
    min-width: 0;
}

.navbar-brand {
    min-width: 0;
}

.navbar-toggler {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--primary-color);
    border-color: rgba(26, 42, 108, 0.25);
}

/* Hamburger drawn with CSS in the navy brand color (currentColor), so it never depends on
   a background image; the theme's Bootstrap 4 CSS resets that image to none. */
.navbar-toggler-icon {
    background-image: none !important;
    display: inline-block;
    position: relative;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
    vertical-align: middle;
}

/* Phones / tablets: compact header so the brand + hamburger fit the viewport */
@media (max-width: 991.98px) {
    .navbar > .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .navbar .navbar-brand img {
        max-height: 40px !important;
        width: auto;
    }
    .navbar-brand-2 {
        font-size: 1rem;
    }
}

@media (min-width: 992px) {
    .navbar-brand-2 {
        font-size: 1.5rem;
    }
}

/* --- Navbar --- */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 10px;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: var(--accent-color);
}

.btn-visit,
.btn-accent {
    background-color: var(--accent-color);
    color: white;
    border-radius: 30px;
    padding: 8px 25px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-visit:hover,
.btn-accent:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Hero Section --- */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(26, 42, 108, 0.6), rgba(26, 42, 108, 0.6)),
                url('https://images.unsplash.com/photo-1438239981037-4b4a50ef77c3?auto=format&fit=crop&q=80&w=1920') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
}

/* --- Info Cards --- */
.info-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(184, 149, 80, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 50%;
    margin-bottom: 20px;
}

/* --- Ministries panel (views/ministry/_ministries.php) --- */
#pnl-ministries .ministry-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

#pnl-ministries .ministry-item + .ministry-item {
    margin-top: 1.5rem;
}

#pnl-ministries .ministry-icon {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(184, 149, 80, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

#pnl-ministries .ministry-title {
    font-size: 1.3rem;
    margin: 0 0 0.4rem;
}

#pnl-ministries .ministry-title a {
    color: var(--primary-color);
    text-decoration: none;
}

#pnl-ministries .ministry-title a:hover {
    color: var(--accent-color);
}

#pnl-ministries .ministry-description {
    margin: 0;
    color: #6c757d;
    overflow-wrap: anywhere;
}

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- Sermon Section --- */
.sermon-img {
    border-radius: 15px;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: 0.3s;
}

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

/* --- Utilities --- */
.text-accent { color: var(--accent-color); }
.bg-navy { background-color: var(--primary-color); }
