a, a:hover { text-decoration: none; }

html {
    font-size: 18px;
}
:root {
    --max-width: 1440px;
    --baseline-rem: 16px;
}

.cms-content-root {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow-x: hidden;
}
.app-container {
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

/* ━━━ HERO ━━━ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 28.75rem;
}
.hero-image {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.hero-image-active {
    opacity: 1;
}

/* ━━━ WELCOME ━━━ */
.welcome-section {
    background-color: #F7F8F9;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}
.welcome-container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.welcome-text-container {
    text-align: center;
}
.welcome-bar {
    width: 2rem;
    height: 0.125rem;
    background: #aaa;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}
.welcome-title {
    font-size: 1.77rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.875rem;
}
.welcome-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    max-width: 25rem;
}
.welcome-cards-container {
    display: flex;
    justify-content: center;
}
.welcome-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    justify-content: flex-start;
    width: fit-content;
}
.welcome-card {
    width: 6.5rem;
    height: 6rem;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    background: white;
    border-radius: 0;
    transition: transform 0.3s ease;
}
.welcome-card:hover {
    transform: translateY(-0.9375rem);
}
.welcome-card-label {
    font-size: 1rem;
    color: #444;
}

/* ━━━ THREE CARDS ━━━ */
.three-cards-section {
    background-color: #ffffff;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}
.three-cards-container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}
.three-card {
    position: relative;
    overflow: hidden;
    height: 13.75rem;
    border-radius: 0;
    background-size: cover;
    background-position: center;
}
.card-1-bg { background-image: url('/UserData/djsmchurch/Layouts/djsmchurch_Layout/images/sermon_bg_1.png'); }
.card-2-bg { background-image: url('https://images.unsplash.com/photo-1545508494-791bd389831e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxiaWJsZSUyMGJvb2slMjBzaGFkb3clMjBsaWdodCUyMG1vb2R5JTIwbm8lMjBwZW9wbGV8ZW58MXx8fHwxNzcyNjI1MDk1fDA&ixlib=rb-4.1.0&q=80&w=1080'); }
.card-3-bg { background-image: url('https://images.unsplash.com/photo-1558418294-9da149757efe?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjbGVhciUyMGJsdWUlMjBza3klMjBtaW5pbWFsfGVufDF8fHx8MTc3MjYyNDk3NHww&ixlib=rb-4.1.0&q=80&w=1080'); }

.three-card-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
}
.card-1-overlay { background: linear-gradient(to bottom, rgba(40,30,20,0.5), rgba(40,30,20,0.7)); }
.card-2-overlay { background: linear-gradient(to bottom, rgba(205,175,141,0.5), rgba(193,164,129,0.7)); }
.card-3-overlay { background: linear-gradient(to bottom, rgba(40,30,50,0.35), rgba(40,30,50,0.6)); }

.three-card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}
.three-card-badge {
    color: rgba(255,255,255,0.85);
    font-size: 0.94rem;
    letter-spacing: 1px;
}
.three-card-title {
    color: white;
    font-size: 1.77rem;
    font-weight: 700;
    margin-top: 0.75rem;
}
.three-card-title-mobile {
    color: white;
    font-size: 1.22rem;
    font-weight: 700;
    margin-top: 0.5rem;
}
.three-card-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 0.94rem;
    margin-top: 0.5rem;
}
.three-card-date {
    color: rgba(255,255,255,0.5);
    font-size: 0.94rem;
    margin-top: 0.25rem;
}
.three-card-arrow {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.three-card:hover .three-card-arrow {
    transform: translateY(-0.25rem);
    background: rgba(255,255,255,0.3);
}

/* ━━━ CHURCH SCHOOL ━━━ */
.church-school-section {
    position: relative;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    background-size: cover;
    background-position: center;
}
.church-school-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.5);
}
.church-school-container {
    position: relative;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}
.church-school-title {
    color: white;
    font-size: 1.77rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.church-school-desc {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 2rem;
}
.church-school-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.church-school-fade-wrapper {
    height: 100%;
}
.school-card {
    padding: 1.25rem;
    background: white;
    border-radius: 0;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    transition: background 0.35s ease;
    cursor: pointer;
}
.school-card:hover {
    background: rgb(55 87 161 / 70%);
}
.school-card-icon {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    transition: filter 0.35s ease;
    transform: scale(0.75);
    transform-origin: center;
}
.school-card-svg {
    transform: scale(1.3);
}
.school-card:hover .school-card-icon {
    filter: brightness(0) invert(1);
}
.school-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.375rem;
    transition: color 0.35s ease;
}
.school-card:hover .school-card-title {
    color: white;
}
.school-card-desc {
    font-size: 0.88rem;
    color: #777;
    white-space: pre-line;
    line-height: 1.6;
    transition: color 0.35s ease;
}
.school-card:hover .school-card-desc {
    color: rgba(255,255,255,0.75);
}

/* ━━━ GALLERY ━━━ */
.gallery-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    background-color: #ffffff;
}
.gallery-container {
    font-family: 'Noto Sans KR', sans-serif;
}
.gallery-title {
    font-size: 1.77rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 2rem;
}
.gallery-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    user-select: none;
    touch-action: pan-y;
    padding: 0 1rem;
}
.gallery-carousel-track {
    display: flex;
}
.gallery-slide {
    flex-shrink: 0;
}
.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.75rem;
    padding: 0 1rem;
}
.gallery-btn-prev,
.gallery-btn-next {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
}
.gallery-arrow-svg {
    height: 1.25rem;
}
.gallery-arrow-left,
.gallery-arrow-right {
    width: 3.75rem;
}
.gallery-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.gallery-dot {
    border-radius: 0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s;
}

/* ━━━ Utils ━━━ */
.desktop-only { display: none; }
.mobile-only  { display: block; }

/* ━━━ MEDIA QUERIES ━━━ */
@media (min-width: 768px) {
    .hero-section {
        height: 45.5rem;
    }
    .welcome-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
    .welcome-container {
        padding-left: 2rem;
        padding-right: 2rem;
        flex-direction: row;
        justify-content: space-between;
        gap: 2.5rem;
    }
    .welcome-text-container {
        text-align: left;
    }
    .welcome-bar {
        margin-left: 0;
        margin-right: 0;
    }
    .welcome-cards-container {
        justify-content: flex-end;
    }
    .welcome-cards-grid {
        display: inline-flex;
        flex-wrap: wrap;
    }
    .welcome-card {
        width: 8.125rem;
        height: 7.5rem;
    }
    .three-cards-section {
        padding-top: 3.75rem;
        padding-bottom: 4.375rem;
    }
    .three-cards-container {
        padding-left: 2rem;
        padding-right: 2rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.875rem;
    }
    .three-card {
        height: 23.75rem;
    }
    .three-card-content {
        padding-top: 2rem;
        padding-right: 1.75rem;
        padding-bottom: 1.75rem;
        padding-left: 2rem;
    }
    .three-card-arrow {
        bottom: 1.75rem;
        right: 1.75rem;
        width: 2.75rem;
        height: 2.75rem;
    }
    .church-school-section {
        padding-top: 4.375rem;
        padding-bottom: 4.375rem;
    }
    .church-school-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .church-school-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
    .school-card {
        padding: 2.5rem 1rem;
    }
    .school-card-icon {
        transform: scale(1);
    }
    .school-card-title {
        font-size: 1.11rem;
    }
    .gallery-section {
        padding-top: 3.75rem;
        padding-bottom: 3.75rem;
    }
    .gallery-carousel-wrapper {
        padding: 0;
    }
    .gallery-arrow-left,
    .gallery-arrow-right {
        width: 10rem;
    }
    .desktop-only { display: block; }
    .mobile-only  { display: none; }
}
