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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Button Styles */
.scroll-button {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    justify-content: center;
    text-align: center;
}

.scroll-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
    background: linear-gradient(45deg, #229954, #27ae60);
}

.scroll-button:focus {
    outline: 2px solid #27ae60;
    outline-offset: 2px;
}

.back-to-top-button {
    background: rgba(39, 174, 96, 0.9);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
    margin-left: 1rem;
    min-width: 120px;
}

.back-to-top-button:hover {
    background: rgba(39, 174, 96, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.5);
}

.section-header-with-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* About Hero Section */
.about-hero {
    background: url('pictures/Residential/project1/3d-rendering-cross-water.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 20%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
    text-align: center;
    color: white;
    border-bottom: 10px solid black;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.about-hero > * {
    position: relative;
    z-index: 2;
}

.about-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-weight: 700;
    line-height: 1.2;
}

.about-hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Content Sections */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-section {
    padding: 4rem 0;
    border-bottom: 1px solid #eee;
}

.about-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #1e3a2e;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    line-height: 1.2;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #27ae60;
    margin: 1rem auto;
    border-radius: 2px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: #444;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.highlight-box {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.highlight-box h3 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    line-height: 1.3;
}

.highlight-box p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    position: relative;
    z-index: 2;
    opacity: 0.95;
    line-height: 1.6;
}

.services-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Teaching section - 4 boxes in a row on desktop */
.teaching-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid #27ae60;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Teaching cards - optimized for 4-in-a-row layout */
.teaching-card {
    background: white;
    padding: 1.8rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid #27ae60;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

.teaching-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

.service-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 1rem;
    display: block;
    color: #27ae60;
}

.service-card h4,
.teaching-card h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #1e3a2e;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.service-card p,
.teaching-card p {
    color: #666;
    line-height: 1.6;
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex-grow: 1;
}

/* Faith Section */
.faith-section {
    background: linear-gradient(rgba(30, 58, 46, 0.8), rgba(45, 90, 66, 0.8)),
                url('pictures/IMG_9792.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 2rem auto;
    color: white;
    min-height: 400px;
    max-width: 850px;
    width: 90%;
}

.faith-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.faith-section .section-title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
}

.faith-section .section-title::after {
    background: #2ecc71;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.faith-section .about-text {
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.8;
}

.faith-section .about-text p {
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.faith-section .about-text strong {
    color: #2ecc71;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Gospel Section */
.gospel-highlight {
    background: linear-gradient(135deg, #1e3a2e, #2d5a42);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 3rem 0;
}

.gospel-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

/* Founder Section */
.founder-section {
    background: #f8f9fa;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.founder-text {
    padding: 2rem;
}

.founder-text h3 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: #1e3a2e;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.founder-text p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    line-height: 1.9;
    color: #444;
    margin-bottom: 2rem;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlight-text {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
}

/* Footer */
.footer {
    background: #1e3a2e;
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-title {
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    color: #2ecc71;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    color: #2ecc71;
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.footer-section p,
.footer-section a {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #2d5a42;
    padding-top: 1rem;
    margin-top: 2rem;
    opacity: 0.8;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    /* Reset background position for mobile - keep it centered */
    .about-hero {
        background-position: center center;
    }
    
    
    /* Buttons */
    .scroll-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: 140px;
    }
    
    .back-to-top-button {
        margin-left: 0;
        margin-top: 1rem;
        min-width: 100px;
    }
    
    .section-header-with-button {
        flex-direction: column;
        text-align: center;
    }
    
    /* Layout adjustments */
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        padding: 0 1rem;
    }
    
    .about-section {
        padding: 3rem 0;
    }
    
    /* Services */
    .services-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    /* Teaching section - stack on mobile with proper centering */
    .teaching-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .teaching-card {
        padding: 1.5rem;
        min-height: auto;
        margin: 0 auto;
        max-width: 350px;
        width: 100%;
    }
    
    /* Faith section */
    .faith-section {
        width: 95%;
        padding: 3rem 1.5rem;
        margin: 1rem auto;
    }
    
    /* Founder section */
    .founder-section {
        padding: 3rem 1.5rem;
        margin: 2rem 0;
    }
    
    .founder-text {
        padding: 1rem;
    }
    
    /* Gospel section */
    .gospel-highlight {
        padding: 3rem 1.5rem;
        margin: 2rem 0;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
    
    .about-hero {
        padding: 5rem 1rem 3rem;
        min-height: 90vh;
    }
    
    .about-content {
        padding: 0 0.5rem;
    }
    
    .scroll-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .highlight-box,
    .faith-section,
    .founder-section,
    .gospel-highlight {
        padding: 2rem 1rem;
        border-radius: 15px;
    }
    
    .service-card {
        padding: 1.2rem;
    }
    
    .teaching-card {
        padding: 1.2rem;
        min-height: auto;
        max-width: 320px;
    }
    
    .teaching-showcase {
        max-width: 320px;
        padding: 0 0.5rem;
    }
    
    .footer-grid {
        max-width: 300px;
    }


@media (max-width: 360px) {
    /* Very small screens */
    .about-hero {
        padding: 4rem 0.5rem 2rem;
    }
    
    .section-title {
        margin-bottom: 1.5rem;
    }
    
    .about-section {
        padding: 2rem 0;
    }
    
    .highlight-box,
    .faith-section,
    .founder-section,
    .gospel-highlight {
        padding: 1.5rem 0.8rem;
        margin: 1rem 0;
    }
    
    .teaching-showcase {
        max-width: 280px;
        padding: 0 0.5rem;
    }
    
    .teaching-card {
        max-width: 280px;
    }
}

/* Medium-large screens - 4 boxes in row for teaching */
@media (min-width: 1024px) {
    .teaching-showcase {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .teaching-card {
        min-height: 300px;
    }
}

/* Large screens optimization */
@media (min-width: 1200px) {
    .about-content {
        padding: 0 3rem;
    }
    
    .services-showcase {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Teaching section - force 4 columns on large screens */
    .teaching-showcase {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .faith-section {
        width: 85%;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .about-hero {
        min-height: 70vh;
        padding: 3rem 2rem;
    }
    
    .about-hero h1 {
        margin-bottom: 1rem;
    }
}