/* General Styles */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* --- THE MAIN FIX --- */
header {
    background: #1c2b4a;
    width: 100%;
    position: sticky; 
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.header-top-title {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-header-area {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 40px;
    background: #1c2b4a;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0; 
}

.logo span {
    color: white;
    font-weight: bold;
    font-size: 22px;
}

.church-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    animation: slowSpin 20s linear infinite, gentleBlink 4s ease-in-out infinite;
}

/* Navigation Links - REMOVED THE STATIC TINY BAR */
nav {
    display: flex;
    align-items: center;
    overflow-x: auto; 
    white-space: nowrap;
    margin-left: 30px;
    padding-bottom: 5px; /* Reduced padding for a tighter look */
    /* border-bottom removed from here to delete the 'tiny bar' */
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: thin; 
    scrollbar-color: #c9a14a transparent;
}

/* Custom Scrollbar for PC (This is now your ONLY bar) */
nav::-webkit-scrollbar {
    height: 8px; /* Slightly thicker for easier use */
    display: block; 
}

nav::-webkit-scrollbar-thumb {
    background: #c9a14a; 
    border-radius: 10px;
}

nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1); /* Very faint track so it looks integrated */
    border-radius: 10px;
}

nav a {
    color: white !important;
    margin-left: 20px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-block;
    padding-bottom: 5px; /* Space between text and scrollbar */
}

nav a:hover, nav a.active {
    color: #c9a14a !important;
}

.sub-header-title {
    background: white;
    color: #333;
    text-align: center;
    padding: 10px 0;
    font-size: 26px;
    font-weight: bold;
    width: 100%;
}

/* --- Animations --- */
@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gentleBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('DEEP.PNG') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 140px 20px;
}

/* ============================================================ */
/* SECTION & CARD STYLES (PC VERSION)                           */
/* ============================================================ */

section {
    padding: 60px 40px;
    background: white;
    margin-bottom: 10px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #1c2b4a;
    padding: 30px;
    text-align: center;
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(201, 161, 74, 0.4);
    border-color: #c9a14a;
}

/* ============================================================ */
/* THE MOBILE FIX (Everything merged here)                      */
/* ============================================================ */

@media (max-width: 768px) {
    .main-header-area {
        flex-direction: column;
        padding: 10px 15px;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 10px;
    }

    nav {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start; 
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    nav::-webkit-scrollbar {
        display: none;
    }
    nav {
        scrollbar-width: none;
    }
    
    nav a:first-child {
        margin-left: 0;
    }

    section {
        padding: 40px 20px;
    }

    .cards {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; 
        gap: 15px;
        display: grid !important; 
    }

    .card {
        padding: 20px 10px; 
        font-size: 14px;    
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 120px; 
        transform: none !important; 
    }

    .card:hover {
        transform: none; 
    }
}
/* ============================================================ */
/* SCREEN ROTATION (LANDSCAPE) FIX                              */
/* ============================================================ */

@media screen and (max-width: 932px) and (orientation: landscape) {
    html, body {
        width: 100vw;
        overflow-x: hidden; /* Prevents the horizontal 'half-way' cut */
    }

    header, .main-header-area, .sub-header-title, section {
        width: 100% !important;
        box-sizing: border-box;
    }

    .hero {
        padding: 80px 20px; /* Reduces height in landscape so you don't have to scroll forever */
    }

    .cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 20px;
    }
}