/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #6c757d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem; /* Increased from 1rem */
}

.underline {
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0 auto 2rem; /* Added bottom margin of 2rem */
    position: relative;
}

.underline::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 4px;
    background: var(--accent-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: -12px; /* Increased from -8px for more space between lines */
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-light {
    background: white;
    color: var(--primary-color);
}

.btn-light:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo .tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    position: relative;
    margin-left: 30px;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.main-nav li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    margin: 0;
    width: 100%;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    text-transform: none;
    font-weight: 400;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown a:hover {
    background: #f8f9fa;
    padding-left: 25px;
}

.mobile-menu-btn {
    display: none;
    padding-left: 20px;
}

.main-nav li:hover .dropdown {
    transform: none;
}

.dropdown.active {
    display: block;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('./images/church_building.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 80px 20px 40px;
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 100%;
    padding: 0 15px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 2rem;
    padding: 0 15px;
}

/* Welcome Section */
.welcome {
    padding: 100px 0;
    background: #f8f9fa;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.welcome-text {
    flex: 1;
}

.welcome-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.welcome-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.welcome-image:hover img {
    transform: scale(1.05);
}

/* Ministries Section */
.ministries {
    padding: 100px 0;
}

.ministry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.ministry-card {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.ministry-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.ministry-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.ministry-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.ministry-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Service Times */
.service-times {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), 
                url('./images/church_building.jpg') no-repeat center center/cover;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.service-times h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.times {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
}

.time-block {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.time-block h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.time-block p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Latest Sermon */
.latest-sermon {
    padding: 100px 0;
    background: #f8f9fa;
}

.sermon-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.sermon-video {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-placeholder {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #2c3e50;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.video-placeholder:hover {
    background: #1a252f;
}

.video-placeholder i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.sermon-details {
    flex: 1;
}

.sermon-details h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.sermon-meta {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.sermon-details p {
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Events Section */
.events {
    padding: 100px 0;
}

.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.event-card {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.event-date {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100px;
}

.event-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-details {
    padding: 20px;
    flex: 1;
}

.event-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.event-details p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.event-details i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: #f8f9fa;
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-details p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1rem;
}

.contact-details i {
    margin-right: 15px;
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.footer-logo {
    justify-self: start;
}

.footer-links {
    justify-self: center;
    text-align: left;
}

.footer-service-times {
    justify-self: end;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4,
.footer-service-times h4,
.footer-newsletter h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-service-times h4::after,
.footer-newsletter h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-service-times p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    max-width: 100%;
    white-space: nowrap;
    gap: 15px;
}

.footer-service-times p strong {
    color: white;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.newsletter-form button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: #c0392b;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 15px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-legal span {
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive Styles */
/* Base mobile-first styles */
html {
    font-size: 14px; /* Base font size for mobile */
}

/* Make sure all form elements are mobile-friendly */
input,
select,
textarea,
button {
    font-size: 1rem; /* Prevent zoom on focus in iOS */
    min-height: 44px; /* Minimum touch target size */
}

/* Ensure buttons and links have adequate touch targets */
a,
button,
[role="button"],
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 20px;
    line-height: 1.4;
}

/* Responsive breakpoints */
@media (min-width: 576px) {
    html {
        font-size: 15px;
    }
    
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 15.5px;
    }
    
    .container {
        max-width: 720px;
    }
    
    .welcome-content {
        flex-direction: row;
        text-align: left;
    }
    
    .welcome-image {
        order: 0;
        margin-top: 0;
    }
    
    .times {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .time-block {
        flex: 1 1 200px;
        max-width: 300px;
        margin: 10px;
    }
    
    .contact-content {
        flex-direction: row;
    }
    
    .contact-info {
        margin-bottom: 0;
        padding-right: 30px;
    }
}

@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
    
    .container {
        max-width: 960px;
    }
    
    .welcome-content {
        gap: 50px;
    }
    
    .ministry-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Mobile Menu Styles */
/* Mobile menu button - hidden by default on desktop */
.mobile-menu-btn {
    display: none; /* Will be shown on mobile via media query */
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: fixed;
    top: 20px;
    right: 15px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn i {
    transition: all 0.3s ease;
}

.mobile-menu-btn.active {
    color: var(--secondary-color);
}

.mobile-menu-btn.active i.fa-bars:before {
    content: '\f00d';
}

/* Hide menu by default on small screens */
/* Removed conflicting @media (max-width: 768px) block - was causing display:none issues */

/* Show desktop nav normally */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
  .main-nav { display: block !important; }
}


/* Touch-friendly elements */
.btn, button, .btn-primary, .btn-secondary {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Improve readability on mobile */
p, li, a, span, div {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive tables */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Hide number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* input[type="number"] {
    -moz-appearance: textfield;
} */


.main-nav {
    display: flex;
    align-items: center;
}

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

.main-nav > ul > li {
    position: relative;
    margin-left: 20px;
}

.main-nav a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* Dropdown menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.main-nav > ul > li:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    width: 100%;
}

.dropdown a {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Mobile styles */

/* Responsive iframes */
iframe, video {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Improve button touch targets on mobile */
.cta-buttons .btn {
    margin: 5px 0;
    min-width: 200px;
}

/* Adjust section padding for mobile */
section {
    padding: 60px 0;
}

@media (max-width: 767px) {
    section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        min-height: 100vh;
        padding: 80px 15px 40px;
    }
    
    .hero h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-logo,
    .footer-links,
    .footer-service-times {
        justify-self: center;
        text-align: center;
    }
    
    .footer-links ul {
        align-items: center;
    }
}

@media (max-width: 991px) {
  .mobile-menu-btn {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10003;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    padding: 80px 0 30px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 10002;
    visibility: hidden;
    opacity: 0;
  }

  .main-nav.active {
    transform: translateX(-280px);
    visibility: visible;
    opacity: 1;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 15px 25px;
    color: #333;
  }

  .main-nav a:hover {
    background: #f8f9fa;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f8f9fa;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }

  .dropdown-parent.open .dropdown {
    height: auto;
  }

  .dropdown a {
    padding: 12px 25px 12px 40px;
    font-size: 0.95rem;
  }

  .overlay.active {
    display: block;
  }
}

