/* CONTAINERS */

.container-main{
    width: 1440px;
    margin: 0 auto;
}

.container-medium{
    width: 1216px;
    margin: 0 auto;
}

@media (max-width: 1440px) {
    .container-main{
        width: 100%;
    }
}

/* Mobile Menu */
.close-menu{
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

/* Burger Menu Animation */
.burger-menu {
    cursor: pointer;
    z-index: 60;
}

.burger-menu span {
    transform-origin: center;
    transition: all 0.3s ease;
}

.burger-menu.active .span-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .span-2 {
    opacity: 0;
}

.burger-menu.active .span-3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.menu-hidden {
    z-index: 50;
    transition: all 0.3s ease;
}

@media (max-width: 1216px) {
    .container-medium{
        width: 100%;
        padding: 0 20px;
    }
}

/* Tab Gallery Styles - Enhanced for better hosting compatibility */
.tab-navigation {
    margin-bottom: 2rem;
}

.tab-navigation .tab-btn {
    background-color: transparent;
    color: #6b7280;
    border-color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-navigation .tab-btn.active {
    background-color: #fbbf24 !important;
    color: #000 !important;
    border-color: #fbbf24 !important;
}

.tab-navigation .tab-btn:hover {
    background-color: #fbbf24;
    color: #000;
    border-color: #fbbf24;
}

.tab-content {
    width: 100%;
    position: relative;
}

.tab-content .tab-pane {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tab-content .tab-pane.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* Masonry Gallery Layout - Enhanced for better hosting compatibility */
.masonry-grid {
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1200px;
    -webkit-columns: 4;
    -moz-columns: 4;
    columns: 4;
    -webkit-column-gap: 20px;
    -moz-column-gap: 20px;
    column-gap: 20px;
    -webkit-column-fill: balance;
    -moz-column-fill: balance;
    column-fill: balance;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    vertical-align: top;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1200px) {
    .masonry-grid {
        -webkit-columns: 3;
        -moz-columns: 3;
        columns: 3;
        -webkit-column-gap: 18px;
        -moz-column-gap: 18px;
        column-gap: 18px;
    }
    .gallery-item {
        margin-bottom: 18px;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        -webkit-columns: 2;
        -moz-columns: 2;
        columns: 2;
        -webkit-column-gap: 15px;
        -moz-column-gap: 15px;
        column-gap: 15px;
    }
    .gallery-item {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        -webkit-columns: 1;
        -moz-columns: 1;
        columns: 1;
        -webkit-column-gap: 0;
        -moz-column-gap: 0;
        column-gap: 0;
    }
    .gallery-item {
        margin-bottom: 15px;
    }
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    filter: brightness(1);
}

.gallery-item:hover img {
    filter: brightness(1.1) contrast(1.05);
}

.gallery-item .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

@media (min-width: 768px) {
    .gallery-item .image-overlay {
        padding: 1rem;
    }
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.gallery-item .image-title {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

@media (min-width: 480px) {
    .gallery-item .image-title {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .gallery-item .image-title {
        font-size: 1rem;
    }
}

/* Fallback Grid Layout for browsers that don't support CSS columns properly */
@supports not (columns: 4) {
    .masonry-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        columns: unset;
        column-gap: unset;
    }
    
    @media (max-width: 1200px) {
        .masonry-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
        }
    }
    
    @media (max-width: 768px) {
        .masonry-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
    }
    
    @media (max-width: 480px) {
        .masonry-grid {
            grid-template-columns: 1fr;
            gap: 15px;
        }
    }
}

/* Force CSS columns for modern browsers */
@supports (columns: 4) {
    .masonry-grid {
        display: block !important;
    }
}

/* Gallery Modal Enhancements */
.gallery-modal {
    backdrop-filter: blur(8px);
}

.gallery-modal img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}