/* Hero Gallery - Full Screen */
.hero-gallery {
    position: relative;
    height: 100vh;
    min-height: 800px;
    overflow: hidden;
    background: transparent;
}

.gallery-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.gallery-slides {
    position: relative;
    height: 100%;
    width: 100%;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.4) 100%
    );
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.6);
    letter-spacing: -0.02em;
    line-height: 1.1;
    white-space: nowrap;
}

.hero-title .welcome-line {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.hero-title .cottage-line {
    display: block;
    font-size: 5.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.5);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

/* OVERRIDE the gallery styles */
.cta-primary {
    background: transparent !important;
    border: 2px solid #2c5530 !important;
    color: #2c5530 !important;
}

.cta-primary:hover {
    background: #739e82 !important;
    color: white !important;
}

.cta-secondary {
    background: transparent !important;
    border: 2px solid #2c5530 !important;
    color: #2c5530 !important;
}

.cta-secondary:hover {
    background: #739e82 !important;
    color: white !important;
}

.cta-primary, .cta-secondary, .btn-book-now {
    background: transparent;
    border: 2px solid #2c5530;
    color: #2c5530;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.cta-primary:hover, .cta-secondary:hover, .btn-book-now:hover {
    background: white;
    color: #2c5530;
}
/* FIX GALLERY PAGE BUTTONS */
.hero-cta .cta-primary,
.hero-cta .cta-secondary {
    background: transparent !important;
    /*border: 2px solid #2c5530 !important;*/
    border: 2px solid white !important;  /* WHITE BORDER */
    color: white !important;  /* WHITE TEXT INITIALLY */
    text-transform: none !important;
    letter-spacing: normal !important;
    border-radius: 8px !important;
}

.hero-cta .cta-primary:hover,
.hero-cta .cta-secondary:hover {
    background: white !important;
    color: #2c5530 !important;  /* GREEN TEXT ON HOVER */
    transform: none !important;
}

.gallery-controls {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 3;
}

.gallery-prev, .gallery-next {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-prev:hover, .gallery-next:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.gallery-dots {
    display: flex;
    gap: 0.5rem;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: white;
    transform: scale(1.2);
}

/* ===== GALLERY PAGE STYLES ===== */

/* Gallery Header */
.gallery-header {
    background: linear-gradient(135deg, #1a2a3a 0%, #2d4a5c 100%);
    color: white;
    text-align: center;
    padding: 80px 0 40px;
}

.gallery-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.gallery-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.category-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.category-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.category-item:hover .category-image {
    transform: scale(1.05);
}

.category-image.placeholder {
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image.placeholder::before {
    content: '📷';
    font-size: 3rem;
    opacity: 0.5;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2d4a5c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.category-item:hover .category-overlay {
    transform: translateY(0);
    opacity: 1;
}

.category-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.view-gallery-btn {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Categories Message */
.no-categories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #666;
}

/* ===== MODAL GALLERY STYLES ===== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

.modal-content {
    position: relative;
    margin: auto;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.modal-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-slides {
    width: 100%;
    height: 100%;
    position: relative;
    flex: 1;
    min-height: 0;
}

.modal-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-slide.active {
    opacity: 1;
    z-index: 1;
}

.modal-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 100;
    padding: 20px;
    box-sizing: border-box;
}

.modal-prev, .modal-next {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev:hover, .modal-next:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.modal-counter {
    color: white;
    font-size: 1.1rem;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.modal-caption {
    display: none;
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    padding: 1rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    z-index: 100;
}

/* Image loading states */
.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.7);
    padding: 1rem 2rem;
    border-radius: 10px;
    z-index: 10;
}

.image-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.7);
    padding: 1rem 2rem;
    border-radius: 10px;
    z-index: 10;
}

.modal-slide.loaded {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ensure modal is always on top */
.modal * {
    box-sizing: border-box;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

@media (max-width: 768px) {
    /* Hero Gallery Mobile */
    .hero-gallery {
        height: 100vh;
        min-height: 600px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        white-space: normal;
    }
    
    .hero-title .welcome-line {
        font-size: 1.5rem;
        white-space: normal;
    }
    
    .hero-title .cottage-line {
        font-size: 3.5rem;
        white-space: normal;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .gallery-controls {
        bottom: 20px;
    }
    
    .gallery-prev, .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Gallery Page Mobile */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }
    
    .gallery-header {
        padding: 60px 0 30px;
    }
    
    .gallery-header h1 {
        font-size: 2.2rem;
    }

    /* Modal Mobile */
    .modal-content {
        padding: 10px;
    }
    
    .modal-controls {
        bottom: 10px;
        gap: 1rem;
    }
    
    .modal-prev, .modal-next {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .modal-caption {
        bottom: 80px;
        font-size: 1rem;
        padding: 0.8rem;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-gallery {
        min-height: 500px;
    }
    
    .hero-title .cottage-line {
        font-size: 2.8rem;
    }
    
    .hero-title .welcome-line {
        font-size: 1.3rem;
    }
}