/* ==========================================
   OUR STORIES SECTION
   ========================================== */

/* Section */
.our-stories-section {
    padding: 100px 2rem;
    margin: 0 auto;
    max-width: 1440px;
    background: #fff;
}

/* Container */
.stories-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

/* Left Content */
.stories-content {
    position: sticky;
    top: 120px;
}

.stories-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.2;
}

.stories-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    opacity: 0.9;
}

.accent-text {
    color: var(--primary-accent);
    font-weight: 600;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.photo-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 800px;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 15px;
    padding: 5px;
    z-index: 10001;
    animation: scaleIn 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00000014;
    border: none;
    border-radius: 100%;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1;
    z-index: 10002;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #ff6b88;
}

.modal-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
}

/* Image Wrapper for counter positioning */
.modal-image-wrapper {
    position: relative;
    width: 100%;
}

/* Modal Info Container */
.modal-info {
    width: 100%;
    padding: 5px;
}

/* Photo Counter */
.modal-counter {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.767);
    color: var(--text-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: left;
    margin: 0;
    flex: 1;
}

/* Carousel Navigation */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .stories-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .stories-content {
        position: static;
    }

    .stories-title {
        font-size: 2.8rem;
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

   
}

@media (max-width: 768px) {
    .our-stories-section {
        padding: 60px 1.5rem;
    }

    .stories-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 20px;
    }

    .stories-description {
        text-align: center;
        font-size: 1.1rem;
        text-align: center;
    }
    /* Horizontal scrolling carousel for mobile */
    .photo-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;

        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .photo-grid::-webkit-scrollbar {
        display: none;
    }

    .photo-item {
        flex-shrink: 0;
        width: 280px;
        height: 280px;
    }

    .modal-description {
        font-size: 1rem;
    }

    /* Adjust carousel controls for tablet */
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }

    .modal-prev {
        left: 15px;
    }

    .modal-next {
        right: 15px;
    }

    .modal-counter {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .stories-title {
        font-size: 2rem;
    }

    .stories-description {
        font-size: 1rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }

    .modal-image {
        max-height: 50vh;
    }

    /* Smaller carousel controls for mobile */
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    /* Stack modal info vertically on mobile */
    .modal-info {
        padding: 5px;
    }

    .modal-counter {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .modal-description {
        font-size: 0.95rem;
    }
}