/* ============================================
   ADVANCED HOMEPAGE REDESIGN STYLES
   ============================================ */

:root {
    --primary-maroon: #800000;
    --gold-accent: #d4af37;
    --gold-darker: #b58500;
    --cream-bg: #fff8e1;
    --brown-text: #5a3d00;
    --light-bg: #f9f9f9;
    --border-brown: #6b4b3e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', 'Gayathri', 'Noto Sans Syriac Western', serif;
    background: linear-gradient(135deg, #fdfbf7 0%, #f5f1e8 100%);
    overflow-x: hidden;
}

/* ============================================
   ENHANCED HERO SECTION WITH PARALLAX EFFECT
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(rgba(92, 26, 26, 0.6), rgba(92, 26, 26, 0.6)), url('images/bright_maroon_leather.png') center/cover no-repeat;
    padding: 30px 5px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: 15px auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L60 40 L90 40 L65 55 L75 90 L50 70 L25 90 L35 55 L10 40 L40 40 Z" fill="rgba(212,175,55,0.1)"/></svg>');
    background-size: 100px;
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }

    100% {
        transform: translateY(-100px) translateX(100px);
    }
}

.hero-banner {
    position: relative;
    z-index: 1;
    max-width: 98%;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-syriac {
    font-family: 'EB Garamond', 'Gayathri', 'Noto Sans Syriac Western', serif;
    font-size: 2em;
    color: var(--gold-accent);
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

/* ============================================
   ULTIMATE LUXURY GOLDEN DIAMOND CUT EFFECT
   ============================================ */
.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 3em;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;

    /* Gradient background for golden tones */
    background: linear-gradient(to bottom,
            #fff9c4 0%,
            #ffd700 20%,
            #ffb300 40%,
            #ffd700 50%,
            #ffb300 60%,
            #ffd700 80%,
            #ff8f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Multiple drop shadows for diamond sparkle effect */
    filter: drop-shadow(0 3px 0 rgba(255, 179, 0, 0.8)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.5)) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));

    /* Pulsing glow animation */
    animation: luxury-pulse 3s ease-in-out infinite;
}

/* Diamond sweep effect - creates the cut diamond shine */
.hero-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.9) 45%,
            rgba(255, 255, 255, 0.9) 55%,
            transparent 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: diamond-sweep 4s linear infinite;
}

@keyframes luxury-pulse {

    0%,
    100% {
        filter: brightness(1) drop-shadow(0 3px 0 rgba(255, 179, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.7)) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    }

    50% {
        filter: brightness(1.2) drop-shadow(0 3px 0 rgba(255, 179, 0, 1)) drop-shadow(0 0 35px rgba(255, 215, 0, 1)) drop-shadow(0 5px 20px rgba(0, 0, 0, 0.6));
    }
}

@keyframes diamond-sweep {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.hero-text {
    font-size: 1.3em;
    color: #d4af37;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   VERSE BANNER WITH GRADIENT
   ============================================ */
.verse-banner {
    background: linear-gradient(to right, var(--cream-bg), #fef9e7, var(--cream-bg));
    padding: 30px 20px;
    text-align: center;
    border-top: 3px solid var(--gold-accent);
    border-bottom: 3px solid var(--gold-accent);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.2);
    margin: 15px auto;
}

.verse-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.2em;
    color: var(--brown-text);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    font-style: italic;
}

/* ============================================
   FEATURED SAINTS CAROUSEL - ADVANCED SLIDER
   ============================================ */
.carousel-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--light-bg) 100%);
    padding: 60px 20px;
    position: relative;
    margin: 15px auto;
}

.carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.carousel-title {
    font-family: 'EB Garamond', 'Gayathri', 'Noto Sans Syriac Western', serif;
    font-size: 2.5em;
    color: var(--primary-maroon);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.carousel-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold-accent), transparent);
}

.carousel-subtitle {
    color: var(--gold-darker);
    font-size: 1.1em;
    font-style: italic;
    margin-top: 20px;
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-saint {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #ffffff 0%, var(--cream-bg) 100%);
    position: relative;
    overflow: hidden;
}

.featured-saint::before {
    content: '✟';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 8em;
    color: rgba(212, 175, 55, 0.08);
    font-family: serif;
}

.saint-icon {
    width: 280px;
    height: 320px;
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(128, 0, 0, 0.3);
    border: 5px solid var(--gold-accent);
    position: relative;
    transition: transform 0.3s ease;
}

.saint-icon:hover {
    transform: scale(1.05) rotate(-2deg);
}

.saint-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.saint-icon:hover img {
    transform: scale(1.1);
}

.saint-content {
    max-width: 800px;
    text-align: center;
}

.saint-name {
    font-family: 'Cinzel', serif;
    font-size: 2.2em;
    color: var(--primary-maroon);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.saint-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.saint-name a:hover {
    color: var(--gold-accent);
}

.saint-dates {
    font-size: 1.5em;
    color: var(--gold-darker);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.saint-description {
    font-size: 1.3em;
    line-height: 1.5;
    color: #333;
    text-align: justify;
    padding: 0 20px;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    pointer-events: all;
    background: rgba(128, 0, 0, 0.8);
    border: 2px solid var(--gold-accent);
    color: var(--gold-accent);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: var(--primary-maroon);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(128, 0, 0, 0.3);
    border: 2px solid var(--gold-accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-maroon);
    width: 40px;
    border-radius: 6px;
}

/* ============================================
   SAINTS DIRECTORY WITH MODERN GRID
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 15px auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 20px;
    /* Ensure grid context doesn't leak */
    isolation: isolate;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.content-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2em;
    color: var(--primary-maroon);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold-accent), transparent);
}

.saints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    padding: 20px 10px;
}

.saint-card {
    background: linear-gradient(145deg, #ffffff, #fcfbf9);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: visible;
    /* Changed to visible for shadow effects */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    text-decoration: none;
    /* Ensure no underline on the link wrapper */
}

.saint-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0);
    transition: all 0.4s ease;
    pointer-events: none;
}

.saint-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(90, 61, 0, 0.15);
    background: #fff;
}

.saint-card:hover::after {
    box-shadow: 0 0 0 2px var(--gold-accent);
}

.saint-card-icon {
    margin-bottom: 20px;
    border-radius: 15px;
    /* Square with rounded corners */
    width: 140px;
    height: 140px;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--gold-accent);
    padding: 3px;
    /* Gap between border and image */
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.saint-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Slightly less than container */
    transition: transform 0.6s ease;
}

.saint-card:hover .saint-card-icon {
    border-color: var(--primary-maroon);
    box-shadow: 0 8px 25px rgba(128, 0, 0, 0.2);
    transform: scale(1.05);
}

.saint-card:hover .saint-card-icon img {
    transform: scale(1.15);
}

.saint-card-name {
    font-family: 'Cinzel', serif;
    font-size: 1.4em;
    color: var(--primary-maroon);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.saint-card:hover .saint-card-name {
    color: var(--gold-darker);
}

.saint-card-title {
    font-size: 1em;
    color: #666;
    font-style: italic;
    font-family: 'EB Garamond', 'Gayathri', 'Noto Sans Syriac Western', serif;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding-top: 10px;
    width: 80%;
    margin-top: auto;
    /* Push to bottom if flex container */
}

/* Tradition Boxes */
/* Tradition Boxes */
.tradition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    padding: 10px;
}

.tradition-box {
    background: linear-gradient(145deg, #ffffff, #fcfbf9);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tradition-box::before {
    content: '✟';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8em;
    color: rgba(212, 175, 55, 0.05);
    font-family: serif;
    transition: all 0.5s ease;
    transform: rotate(15deg);
}

.tradition-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(128, 0, 0, 0.15);
    background: #fff;
    border-color: var(--gold-accent);
}

.tradition-box:hover::before {
    transform: rotate(0deg) scale(1.1);
    color: rgba(212, 175, 55, 0.1);
}

.tradition-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6em;
    color: var(--primary-maroon);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    border-bottom: 3px solid var(--gold-accent);
    padding-bottom: 5px;
}

.tradition-text {
    font-size: 1.15em;
    line-height: 1.7;
    color: #4a4a4a;
    font-family: 'EB Garamond', 'Gayathri', 'Noto Sans Syriac Western', serif;
}

/* Ensure links inside tradition boxes don't break layout */
.tradition-box a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* ============================================
   ENHANCED SIDEBAR
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 12px 35px rgba(128, 0, 0, 0.2);
    transform: translateY(-5px);
}

.widget-title {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, var(--primary-maroon) 0%, #5a0000 100%);
    color: var(--gold-accent);
    padding: 15px 20px;
    font-size: 1.2em;
    border-bottom: 3px solid var(--gold-accent);
}

.widget-content {
    padding: 20px;
}

/* Feast Box */
.feast-box {
    background: linear-gradient(135deg, var(--cream-bg) 0%, #fef9e7 100%);
    border: 2px solid var(--gold-accent);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: var(--brown-text);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.feast-box strong {
    color: var(--gold-darker);
    font-size: 1.1em;
}

/* Bible Verse */
.bible-verse {
    background: linear-gradient(135deg, var(--light-bg) 0%, #ffffff 100%);
    border-left: 4px solid var(--gold-accent);
    padding: 20px;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.reference {
    margin-top: 10px;
    font-style: italic;
    color: var(--gold-darker);
    font-weight: 600;
}

/* Announcements */
.announcement-box {
    background: var(--cream-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-maroon);
    transition: all 0.3s ease;
}

.announcement-box:hover {
    background: #fef9e7;
    transform: translateX(5px);
}

.announcement-title {
    font-weight: 700;
    color: var(--primary-maroon);
    margin-bottom: 8px;
    font-size: 1.1em;
}

.announcement-text {
    color: var(--brown-text);
    line-height: 1.6;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.photo-placeholder {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.photo-placeholder:hover {
    transform: scale(1.05);
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ad Space */
.ad-space {
    text-align: center;
    padding: 20px;
}

.ad-space img {
    width: 100%;
    max-width: 250px;
    border-radius: 10px;
}

/* ============================================
   RESPONSIVE DESIGN - ENHANCED FOR MOBILE
   ============================================ */

/* Ensure images are always responsive */
img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Hero Section */
    .hero {
        padding: 20px 5px;
    }

    .hero-banner img {
        max-width: 100px;
    }

    .hero-title {
        font-size: 2em;
        letter-spacing: 1px;
    }

    .hero-syriac {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .hero-text {
        font-size: 1em;
        line-height: 1.7;
        padding: 0;
    }

    /* Verse Banner */
    .verse-banner {
        padding: 20px 15px;
    }

    .verse-text {
        font-size: 1em;
        line-height: 1.6;
    }

    /* Carousel Section */
    .carousel-section {
        padding: 40px 10px;
    }

    .carousel-title {
        font-size: 1.8em;
    }

    .carousel-subtitle {
        font-size: 1em;
    }

    .featured-saint {
        padding: 40px 20px;
    }

    .saint-icon {
        width: 200px;
        height: 240px;
    }

    .saint-icon img {
        object-fit: cover;
    }

    .saint-name {
        font-size: 1.8em;
    }

    .saint-dates {
        font-size: 1em;
    }

    .saint-description {
        font-size: 1em;
        padding: 0 10px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }

    .carousel-nav {
        padding: 0 5px;
    }

    /* Main Content */
    .main-content {
        padding: 0 15px;
        margin: 30px auto;
        gap: 30px;
    }

    .content-box {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .saints-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px;
    }

    .saint-card {
        padding: 15px;
    }

    .saint-card-icon img {
        width: 100px;
        height: 100px;
    }

    .saint-card-name {
        font-size: 1.1em;
    }

    .saint-card-title {
        font-size: 0.85em;
    }

    /* Tradition Grid */
    .tradition-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tradition-box {
        padding: 20px;
    }

    .tradition-title {
        font-size: 1.3em;
    }

    .tradition-text {
        font-size: 1.2em;
    }

    /* Loading Screen */
    .loading-cross img {
        max-width: 180px;
    }

    .loading-text {
        font-size: 1.2em;
    }

    /* Popup */
    #popup-overlay {
        padding: 15px;
    }

    #popup-box {
        max-width: 90%;
        padding: 20px;
    }

    #popup-box h2 {
        font-size: 1.3em;
    }

    #popup-box p {
        font-size: 0.9em;
    }

    #close-popup {
        padding: 10px 20px;
        min-height: 44px;
        font-size: 1em;
    }

    /* Fix footer overlap */
    /* Fixed Footer Mobile Display */
    #footer-placeholder {
        margin-top: 50px;
        position: relative;
        z-index: 100;
        clear: both;
        width: 100%;
        display: block;
    }

    /* Ensure footer aligns correctly in mobile */
    footer {
        margin-top: 0 !important;
        position: relative;
        width: 100%;
    }

    .main-content {
        margin-bottom: 50px;
        position: relative;
        z-index: 1;
        display: block;
        /* Ensure it doesn't hold grid gaps weirdly if empty */
    }

    /* Re-apply grid for content inside if needed, 
       but main container being block helps clearing */
    .content-area {
        margin-bottom: 20px;
    }
}
