/* ============ COMMON SECTION TITLES ============ */
.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #d4af37;
    font-weight: 400;
    letter-spacing: 2px;
    font-display: swap; /* Prevent layout shift while font loads */
}

/* ============ CAROUSEL - SWIPER ============ */
/* Note: Critical carousel CSS is inlined in home_page.html for performance */
/* Only decorative/non-critical styles here */

.carousel-section {
    margin: 60px 0 80px 0;
}

.carousel-title {
    margin-bottom: 30px;
}

.swiper-slide:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.swiper-slide img {
    /* Content-visibility for rendering optimization */
    content-visibility: auto;
}

/* ============ LATEST PHOTOGRAPHS ============ */
.latest-section {
    margin: 80px 0;
}

.latest-title {
    margin-bottom: 40px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    /* Contain layout for performance */
    contain: layout style paint;
}

.photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Prevent layout shift from hover transforms */
    will-change: transform, box-shadow;
    /* Background placeholder to reduce CLS */
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    /* Explicit min-height to reserve space */
    min-height: 250px;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
    /* Lazy loading optimization */
    content-visibility: auto;
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px 15px 15px;
    color: #fff;
}

.photo-info h3 {
    margin: 0;
    font-size: 1rem;
    font-family: 'Playfair Display', serif;
}

/* ============ LIGHTBOX ============ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #d4af37;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.7);
    border: none;
    color: #1a1a1a;
    font-size: 18px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: #d4af37;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 14px;
        width: 36px;
        height: 36px;
        padding: 0;
    }
    
    .lightbox-prev {
        left: 8px;
    }
    
    .lightbox-next {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .lightbox-nav {
        font-size: 12px;
        width: 32px;
        height: 32px;
        padding: 0;
        background: rgba(212, 175, 55, 0.85);
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
}

/* ============ HERO SECTION ============ */
.main-content {
    flex: 1;
}

/* ============ HERO SECTION ============ */
/* Note: Critical hero CSS is inlined in home_page.html for performance */
/* Only decorative styles here */

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, rgba(212, 175, 55, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.warning-alert {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.warning-alert i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 8px;
    display: block;
}

.warning-title {
    font-size: 1.1rem;
    color: #d4af37;
    margin: 8px 0;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
}

.warning-text {
    font-size: 0.85rem;
    color: #ccc;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

.warning-text strong {
    color: #ff6b6b;
    font-weight: 700;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    color: #d4af37;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.hero-subtitle {
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    color: #bbb;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.1) 50%, transparent 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.hero-subtitle::before {
    content: '✦';
    margin-right: 10px;
    color: #d4af37;
}

.hero-subtitle::after {
    content: '✦';
    margin-left: 10px;
    color: #d4af37;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn {
    padding: 12px 32px;
    font-size: 0.95rem;
    border: 2px solid #d4af37;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn span {
    transition: all 0.3s ease;
}

.btn-primary {
    background: #d4af37;
    color: #1a1a1a;
}

.btn-primary:hover {
    background: transparent;
    color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover i {
    transform: translateY(-2px) scale(1.15);
}

.btn-secondary {
    background: transparent;
    color: #d4af37;
}

.btn-secondary:hover {
    background: #d4af37;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-secondary:hover i {
    transform: translateY(-2px) scale(1.15);
}

.btn-secondary:hover {
    background: #d4af37;
    color: #1a1a1a;
}

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

@media (max-width: 768px) {
    .hero {
        padding: 20px 20px;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        gap: 10px;
    }

    .btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

/* ============ LATEST STORIES - MODERN REDESIGN ============ */
.latest-stories {
    margin: 100px 0;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.5) 0%, rgba(26, 26, 26, 0.5) 100%);
    padding: 60px 20px;
    border-radius: 12px;
}

.stories-title {
    margin: 0 0 50px 0;
    position: relative;
    padding-bottom: 20px;
}

.stories-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    /* Contain layout for performance */
    contain: layout style paint;
}

.story-card {
    border-radius: 10px;
    overflow: hidden;
    background: #2d2d2d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    position: relative;
    /* Prevent CLS from hover transforms */
    will-change: transform, box-shadow;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.story-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(212, 175, 55, 0.25);
}

.story-card:hover::before {
    opacity: 1;
}

.story-image {
    width: 100%;
    height: 220px;
    min-height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    /* Rendering optimization */
    content-visibility: auto;
    /* Background placeholder */
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    /* Prevent layout shift */
    aspect-ratio: 350 / 220;
}

.story-card:hover .story-image {
    transform: scale(1.08);
}

.story-content {
    padding: 24px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.story-content h3 {
    margin: 0 0 12px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-meta {
    margin: 0;
    font-size: 0.85rem;
    color: #d4af37;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.story-excerpt {
    display: block;
    margin: 12px 0 0 0;
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .story-card {
        border-radius: 8px;
    }

    .story-image {
        height: 180px;
    }

    .story-content {
        padding: 20px 16px;
    }

    .story-content h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .latest-stories {
        margin: 60px 0;
        padding: 40px 15px;
    }

    .stories-title {
        font-size: 1.8rem;
        margin-bottom: 35px;
    }

    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .story-image {
        height: 140px;
    }

    .story-content {
        padding: 16px 12px;
    }

    .story-content h3 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .story-meta {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Stories section on mobile */
    .latest-stories {
        margin: 40px 0;
        padding: 25px 10px;
    }

    .stories-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .story-card {
        display: grid;
        grid-template-columns: 120px 1fr;
        border-radius: 6px;
    }

    .story-image {
        height: 100%;
        min-height: 120px;
        border-radius: 6px 0 0 6px;
    }

    .story-content {
        padding: 12px;
    }

    .story-content h3 {
        font-size: 0.9rem;
        -webkit-line-clamp: 1;
    }

    .story-meta {
        font-size: 0.75rem;
    }

    /* Hero section on mobile */
    .hero {
        padding: 15px 10px;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ============ LIGHTBOX RESPONSIVE DESIGN ============ */
/* Desktop - Default */
#photoLightbox {
    padding: 20px !important;
    display: none !important;
}

#photoLightbox.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#photoLightbox > div:first-of-type {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    max-width: 1400px;
    max-height: 85vh;
    height: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

#photoLightbox > div:first-of-type > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

#photoLightboxImg {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    width: auto;
    height: auto;
    display: block;
}

#photoInfoPanel {
    width: 350px !important;
    min-width: 350px;
}

#photoLightbox button[id$="PhotoBtn"] {
    display: flex !important;
}

/* Tablet - Medium screens (768px and below) */
@media (max-width: 768px) {
    #photoLightbox {
        padding: 15px !important;
    }
    
    #photoLightbox.active {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    #photoLightbox > div:first-of-type {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin: 0 !important;
        align-items: stretch;
        justify-content: flex-start;
    }

    #photoLightbox > div:first-of-type > div:first-child {
        width: 100%;
        height: auto;
        min-height: 300px;
        flex: none;
    }

    #photoLightboxImg {
        max-width: 100% !important;
        max-height: 50vh !important;
        object-fit: contain !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto;
    }

    #photoInfoPanel {
        width: 100% !important;
        min-width: 100% !important;
        max-height: 40vh !important;
        overflow-y: auto !important;
        scrollbar-width: thin;
    }

    #closePhotoLightbox {
        top: 10px !important;
        right: 10px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 24px !important;
    }

    #prevPhotoBtn,
    #nextPhotoBtn {
        top: 50% !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    #prevPhotoBtn {
        left: 10px !important;
    }

    #nextPhotoBtn {
        right: 10px !important;
    }
}

/* Mobile - Small screens (480px and below) */
@media (max-width: 480px) {
    #photoLightbox {
        padding: 10px !important;
    }

    #photoLightbox > div:first-of-type {
        gap: 15px;
        align-items: stretch;
        justify-content: flex-start;
    }

    #photoLightbox > div:first-of-type > div:first-child {
        width: 100%;
        height: auto;
        min-height: 250px;
        flex: none;
    }

    #photoLightboxImg {
        max-width: 100% !important;
        max-height: 40vh !important;
        object-fit: contain !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto;
    }

    #photoInfoPanel {
        max-height: 35vh !important;
        font-size: 0.9rem;
        overflow-y: auto !important;
        scrollbar-width: thin;
    }

    #closePhotoLightbox {
        top: 8px !important;
        right: 8px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }

    #prevPhotoBtn,
    #nextPhotoBtn {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }

    #prevPhotoBtn {
        left: 5px !important;
    }

    #nextPhotoBtn {
        right: 5px !important;
    }

    #photoLightboxTitle {
        font-size: 16px !important;
    }

    #photoLightboxCounter {
        font-size: 12px !important;
    }
}
