/* 
   Ministry Website Styles
   A professional ministry website with calming blue color scheme
*/

:root {
    /* Color Palette - Blues */
    --primary-color: #0066cc; /* Main blue */
    --primary-dark: #004080;
    --primary-light: #4d94ff;
    --accent-color: #00264d;
    --text-color: #333333;
    --light-text: #777777;
    --bg-light: #f5f8fc;
    --white: #ffffff;
}

/* Base Styles */
html, body {
    font-family: 'Source Sans Pro', 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.site-wrapper {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 0.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Utility Classes */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    display: inline-block;
    text-decoration: none;
}

.btn-outline:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.5rem auto;
}

/* Header Styles */
.navbar {
    padding: 1rem 0;
    background-color: white;
    box-shadow: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    overflow: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.navbar-brand.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    margin: 0 0 0 1.5rem; /* Reduced space between nav items for better fit */
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    letter-spacing: 0.5px; /* Reduced letter spacing for better fit */
    text-transform: uppercase;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-color); /* Force blue color */
    font-weight: 600;
    text-decoration: none;
}

/* Mobile navigation adjustments */
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1050;
    margin-left: auto;
    margin-right: 0;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

@media (max-width: 1100px) {
    html, body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Specific fix for 1028px width where content was getting cut off */
@media (max-width: 1040px) and (min-width: 992px) {
    .nav-link {
        margin: 0 0 0 1rem;
        font-size: 0.85rem;
    }
    
    .navbar-brand.logo-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 991px) {
    html, body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .navbar .container {
        justify-content: space-between;
    }
    
    nav {
        order: 3;
    }
    
    .hamburger-menu {
        display: block;
        order: 2;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        flex-direction: column;
        background-color: white;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transition: 0.3s;
        text-align: center;
        padding: 30px 0;
        z-index: 1000;
    }
    
    .nav-links.show {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-link {
        margin: 0;
        font-size: 1.1rem;
    }
    
    /* Hero section mobile fixes */
    .hero {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        padding-left: 0;
        padding-right: 0;
    }
    
    .hero-content {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-text {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    /* Adjust container padding */
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    /* All content areas properly contained */
    section, div, main, article, aside, header, footer {
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* Images should not overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Rotate hamburger to X when menu is open */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 10rem 0;
    margin-top: 0;
    text-align: center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 450px;
    background-image: url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-color: #0066cc;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 80, 160, 0.7), rgba(0, 102, 204, 0.8));
    z-index: 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 100%;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.25rem;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

/* Featured Book Section */
.featured-book {
    background-color: #f0f7ff; /* Light blue background */
    color: var(--text-color);
    padding: 4rem 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.featured-book h2 {
    color: var(--accent-color);
    text-align: center;
}

.featured-book-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.featured-book-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .featured-book-content {
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .featured-book-image {
        flex: 0 0 auto;
        margin-right: 2rem;
        max-width: 200px;
    }
    
    .featured-book-text {
        flex: 1;
    }
}

/* Fix for 1028px width */
@media (max-width: 1040px) and (min-width: 768px) {
    .featured-book-content {
        flex-wrap: nowrap;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .featured-book-image {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        margin-right: 1.5rem;
        flex-shrink: 0;
    }
    
    .featured-book-text {
        flex: 1;
        min-width: 0;
    }
}

.featured-book-image {
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 4px;
    transition: transform 0.3s ease;
    max-width: 230px;
}

.featured-book-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.featured-book-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .featured-book-image {
        margin-bottom: 0;
        margin-right: 3rem;
    }
}

.featured-book-text {
    text-align: center;
}

@media (min-width: 768px) {
    .featured-book-text {
        text-align: left;
    }
}

.featured-book-text h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.featured-book-text h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.featured-book-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* YouTube Section */
.youtube-section {
    background-color: var(--white);
    padding: 4rem 0;
    margin-top: 3rem;
}

.youtube-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for main video, 1/3 for stacked videos */
    gap: 2rem;
}

/* First column - main video */
.youtube-video.main-video {
    grid-row: span 1;
    height: 100%;
}

/* Second column - stacked videos */
.column-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.youtube-video {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    padding-bottom: 0.5rem;
}

.youtube-video:hover {
    transform: translateY(-5px);
}

.youtube-video iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.youtube-video h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
}

/* Media query for tablet and mobile screens */
@media (max-width: 992px) {
    .youtube-container {
        grid-template-columns: 1fr; /* Single column on mobile and tablet */
    }
    
    .column-right {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .column-right {
        display: flex;
        flex-direction: column;
    }
}

/* Footer */
footer {
    background-color: var(--accent-color);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.get-in-touch {
    text-align: center;
}

.footer-content h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}