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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #af3e4d;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --add-to-cal-hover: #555555;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    min-width: 320px;
}

/* Skip to main content link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Enhanced focus indicators for keyboard navigation - only on buttons and form elements */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Ensure focus is visible on logo link */
.logo-link:focus {
    outline: 3px solid var(--text-light);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

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

.header {
    background-color: var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
}

.logo-link {
    color: var(--text-light);
    text-decoration: none;
}

.logo-link:hover,
.logo-link:active,
.logo-link:visited {
    color: var(--text-light);
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger:focus {
    outline: 3px solid var(--text-light);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav.active {
    max-height: 400px;
    box-shadow: var(--shadow);
}

.nav-list {
    list-style: none;
    padding: 20px 0;
}

.nav-list li {
    text-align: center;
}

.nav-list a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-list a:hover,
.nav-list a:focus {
    background-color: var(--secondary-color);
}

.nav-list a[aria-current="page"] {
    background-color: var(--secondary-color);
    font-weight: 700;
}

.hero {
    margin-top: 80px;
    height: 400px;
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-divider {
    width: 100px;
    height: 3px;
    background-color: var(--text-light);
    margin: 0 auto;
}

.carousel-section {
    padding: 40px 0;
    background-color: var(--bg-light);
}

.carousel {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-inner {
    position: relative;
    width: 100%;
    min-height: 500px;
    padding-bottom: 80px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.carousel-content {
    padding: 40px 30px 80px 30px;
    text-align: center;
}

@media (max-width: 767px) {
    .carousel-inner {
        min-height: 580px;
    }
    
    .carousel-content {
        padding: 40px 60px 120px 60px;
    }
}

@media (max-width: 320px) {
    .carousel-inner {
        min-height: 620px;
    }
    
    .carousel-content {
        padding: 30px 50px 130px 50px;
    }
}

.event-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.carousel-content h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.event-time {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.event-description {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
}

.event-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.event-button:hover,
.event-button:focus {
    background-color: #a01729;
    transform: translateY(-2px);
}

.carousel-control {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
    color: var(--primary-color);
    z-index: 10;
}

.carousel-control:hover,
.carousel-control:focus {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 767px) {
    .carousel-control {
        top: 50%;
    }
}

.carousel-control.prev {
    left: 15px;
}

.carousel-control.next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

.indicator:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.content-section {
    padding: 60px 0;
}

.welcome-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-content h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.welcome-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 0 20px;

    a:link {
        color: var(--text-light);
    }

    a:visited {
        color: var(--text-light);
    }

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

    a:hover {
        font-weight: bold;
    }
}

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

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.service-times {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.service-time {
    display: grid;
    grid-template-columns: 75px 85px 1fr;
    gap: 12px;
    font-size: 14px;
    opacity: 0.9;
}

.service-time .day {
    font-weight: 600;
    text-align: left;
}

.service-time .time {
    text-align: right;
}

.service-time .description {
    text-align: left;
    opacity: 0.85;
}

/* Hide description column on very small screens */
@media (max-width: 335px) {
    .service-time {
        grid-template-columns: 100px 140px;
    }
    
    .service-time .description {
        display: none;
    }
}

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

.footer-bottom p {
    font-size: 14px;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
    
    .nav {
        position: static;
        max-height: none;
        overflow: visible;
    }
    
    .nav-list {
        display: flex;
        gap: 5px;
        padding: 0;
    }
    
    .nav-list li {
        text-align: left;
    }
    
    .nav-list a {
        padding: 10px 18px;
        border-radius: 6px;
    }
    
    .hero {
        height: 500px;
        background-position: center 40%;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-divider {
        width: 150px;
    }
    
    .carousel {
        max-width: 700px;
    }
    
    .carousel-inner {
        min-height: 480px;
    }
    
    .carousel-content {
        padding: 50px 40px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .logo-text h1 {
        font-size: 24px;
    }
    
    .logo-text p {
        font-size: 18px;
    }
    
    .hero {
        height: 600px;
        background-position: center 35%;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .carousel {
        max-width: 800px;
    }
    
    .carousel-inner {
        min-height: 500px;
    }
    
    .carousel-content h3 {
        font-size: 32px;
    }
    
    .event-time {
        font-size: 20px;
    }
    
    .event-description {
        font-size: 18px;
    }
}

@media (min-width: 1600px) {
    .hero {
        background-position: center 30%;
    }
}

@media (min-width: 2000px) {
    .hero {
        background-position: center 30%;
    }
}

/* Sermons Page Styles */
.sermons-hero {
    margin-top: 80px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 18px;
    margin-top: 15px;
    opacity: 0.95;
}

.sermons-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.sermons-intro {
    text-align: center;
    margin-bottom: 50px;
}

.sermons-intro h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.sermons-intro p {
    font-size: 18px;
    color: var(--text-dark);
    opacity: 0.8;
}

.sermons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.sermon-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sermon-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sermon-info {
    padding: 20px;
}

.sermon-info h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.sermon-date {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.sermon-description {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.6;
    opacity: 0.8;
}

.channel-link {
    text-align: center;
    margin-top: 40px;
}

.channel-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.channel-button:hover,
.channel-button:focus {
    background-color: #a01729;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .sermons-hero {
        height: 350px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .sermons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
}

@media (min-width: 1024px) {
    .sermons-hero {
        height: 400px;
    }
    
    .sermons-intro h2 {
        font-size: 42px;
    }
    
    .sermons-intro p {
        font-size: 20px;
    }
}

/* Loading, Error, and Empty States */
.loading-container,
.error-container,
.no-videos-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    font-size: 18px;
    color: var(--text-dark);
    opacity: 0.7;
}

.error-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.error-message {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.error-help {
    font-size: 14px;
    color: var(--text-dark);
    opacity: 0.7;
}

.no-videos-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.no-videos-container p {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-videos-container a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.no-videos-container a:hover {
    text-decoration: underline;
}

/* Events Page Styles */
.events-hero {
    margin-top: 80px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.events-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.events-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-info {
    font-size: 14px;
    color: var(--text-dark);
    opacity: 0.7;
}

.view-toggle-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.view-toggle-link:hover,
.view-toggle-link:focus {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.event-date-badge {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 15px;
    text-align: center;
    min-width: 80px;
}

.event-month {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.event-day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.event-content {
    padding: 25px;
    flex: 1;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.event-title {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.event-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.event-title-link:hover,
.event-title-link:focus {
    color: var(--secondary-color);
    text-decoration: underline;
}

.event-title-link:hover .event-title,
.event-title-link:focus .event-title {
    color: var(--secondary-color);
}

.event-category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile: Stack category below title for better title wrapping */
@media (max-width: 767px) {
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .event-title {
        width: 100%;
    }
}

.category-service {
    background-color: #e3f2fd;
    color: #1976d2;
}

.category-study {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.category-fellowship {
    background-color: #fff3e0;
    color: #f57c00;
}

.category-outreach {
    background-color: #e8f5e9;
    color: #388e3c;
}

.category-youth {
    background-color: #fce4ec;
    color: #c2185b;
}

.category-special {
    background-color: #fff9c4;
    color: #f57f17;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dark);
    opacity: 0.8;
}

.event-meta-item svg {
    flex-shrink: 0;
    color: var(--secondary-color);
}

.event-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.event-contact {
    font-size: 14px;
    color: var(--text-dark);
    opacity: 0.8;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.event-contact a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-left: 5px;
}

.event-contact a:hover {
    text-decoration: underline;
}

/* Shared Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

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

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #a01729;
    transform: translateY(-2px);
}

.event-register-btn:hover,
.event-register-btn:focus {
    background-color: #a01729;
    transform: translateY(-2px);
}

.no-events-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.no-events-container p {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

/* Pagination Styles */
#pagination {
    margin-top: 40px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-number {
    display: inline-block;
    padding: 10px 16px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover,
.pagination-btn:focus,
.pagination-number:hover,
.pagination-number:focus {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
}

.pagination-number.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-light);
    cursor: default;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-ellipsis {
    padding: 0 5px;
    color: var(--text-dark);
    opacity: 0.5;
}

/* Calendar Icons Section */
.event-calendar-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.calendar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    opacity: 0.8;
}

.calendar-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calendar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #f5f5f5;
}

.calendar-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-icon svg {
    transition: transform 0.2s ease;
}

.calendar-icon:hover svg {
    transform: scale(1.1);
}

/* Brand-specific colors */
.google-calendar {
    background-color: #f5f5f5;
}

.google-calendar:hover {
    background-color: var(--add-to-cal-hover);
}

.google-calendar svg {
    fill: #4285f4;
}

.google-calendar:hover svg {
    fill: white;
}

.outlook-calendar {
    background-color: #f5f5f5;
}

.outlook-calendar:hover {
    background-color: var(--add-to-cal-hover);
}

.outlook-calendar svg {
    fill: #0078d4;
}

.outlook-calendar:hover svg {
    fill: white;
}

.apple-calendar {
    background-color: #f5f5f5;
}

.apple-calendar:hover {
    background-color: var(--add-to-cal-hover);
}

.apple-calendar svg {
    fill: var(--add-to-cal-hover);
}

.apple-calendar:hover svg {
    fill: white;
}

/* Event Location Link */
.event-location-link {
    color: inherit;
    text-decoration: none;
}

.event-location-link:visited {
    color: inherit;
}

.event-location-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .events-hero {
        height: 350px;
    }
    
    .event-card {
        flex-direction: row;
    }
    
    .event-date-badge {
        min-width: 100px;
    }
    
    .event-meta {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .event-meta-item {
        flex: 0 0 auto;
    }
}

@media (min-width: 1024px) {
    .events-hero {
        height: 400px;
    }
    
    .event-title {
        font-size: 24px;
    }
}

/* ============================================================================
   CONTACT PAGE STYLES
   ============================================================================ */

.contact-hero {
    margin-top: 80px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
}

.contact-hero .hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
}

.contact-hero .hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.contact-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
}

.contact-info h2,
.contact-map h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-intro {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-cards {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-details h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-details p {
    font-size: 15px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

.contact-details a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-map {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    box-sizing: border-box;
}

.map-link {
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
    padding: 10px;
}

.map-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.map-link a:hover {
    color: var(--primary-color);
}

/* Contact Map Responsive Sizing */
.contact-map iframe {
    width: 320px;
    height: 220px;
    display: block;
    margin: 0 auto;
}

/* Hide map iframe below 375px but keep heading and link */
@media (max-width: 374px) {
    .contact-map iframe {
        display: none;
    }
    
    .map-link {
        max-width: 100%;
        text-align: left;
    }
}

/* Medium screens - larger map */
@media (min-width: 500px) {
    .contact-map iframe {
        width: 400px;
        height: 300px;
    }
    
    .map-link {
        max-width: 400px;
    }
}

/* Desktop - two column layout with map on right */
@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }

    .contact-section {
        padding: 80px 0;
    }

    .contact-map iframe {
        width: 100%;
        height: 450px;
    }
    
    .map-link {
        max-width: 100%;
    }
}

/* Tablet and up - hero styling */
@media (min-width: 768px) {
    .contact-hero {
        height: 350px;
    }

    .contact-hero .hero-title {
        font-size: 52px;
    }

    .contact-hero .hero-subtitle {
        font-size: 20px;
    }

    .contact-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (min-width: 1024px) {
    .contact-hero {
        height: 400px;
    }
}

/* ============================================================================
   ABOUT PAGE STYLES
   ============================================================================ */

.about-hero {
    margin-top: 80px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.about-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.about-church {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.about-church h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.about-church p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.about-church p:last-child {
    margin-bottom: 0;
}

.pastor-section {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.pastor-section h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.pastor-bio {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.pastor-image-container {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.pastor-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 90px;
    z-index: 2;
}

.pastor-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-top-left-radius: 16px;
    opacity: 0.95;
}

.pastor-badge::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: -1;
    filter: blur(8px);
}

.pastor-badge-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 90px;
    height: 90px;
    z-index: 2;
}

.pastor-badge-bottom::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    border-bottom-right-radius: 16px;
    opacity: 0.95;
}

.pastor-badge-bottom::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    z-index: -1;
    filter: blur(8px);
}

.pastor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
}

.pastor-details h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.pastor-title {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.pastor-details p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.pastor-details p:last-child {
    margin-bottom: 0;
}

.about-beliefs {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.about-beliefs h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.beliefs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.belief-card {
    padding: 25px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.belief-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.belief-card h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.belief-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.belief-card.expanded p {
    -webkit-line-clamp: unset;
    display: block;
}

.belief-read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    transition: color 0.3s ease;
}

.belief-read-more:hover,
.belief-read-more:focus {
    color: #a01729;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .about-hero {
        height: 350px;
    }

    .pastor-bio {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .pastor-image-container {
        width: 300px;
        height: 300px;
    }

    .beliefs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .about-hero {
        height: 400px;
    }

    .about-section {
        padding: 80px 0;
    }

    .about-church,
    .pastor-section,
    .about-beliefs {
        padding: 50px 40px;
    }
}
