/**
 * company-gallery.css - Premium Gallery Design
 * Uses centralized colors from main.css
 * White theme with perfect contrast
 */

/* ===================================
   GALLERY MAIN SECTION
   =================================== */

.gallery-main {
    background: var(--bg-secondary, #F8F9FA);
    min-height: 50vh;
    padding: 80px 0;
}

.gallery-item {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s ease;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white, #FFFFFF);
    cursor: pointer;
    height: 100%;
    border: 2px solid transparent;
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--primary-orange, #FF6B35) 0%, 
        var(--primary-red, #E63946) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    mix-blend-mode: multiply;
}

.gallery-card:hover::before {
    opacity: 0.12;
}

.gallery-card:hover {
    transform: translateY(-16px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-orange, #FF6B35);
}

.gallery-card img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(26, 26, 46, 0) 0%, 
        rgba(26, 26, 46, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: var(--text-white, #FFFFFF);
    z-index: 2;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-info {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white, #FFFFFF);
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-description {
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Inter', sans-serif;
}

.gallery-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.gallery-categories .badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    font-weight: 600;
    background: var(--primary-orange, #FF6B35) !important;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 1.75rem;
    color: var(--white, #FFFFFF);
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-card:hover .gallery-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Featured items - larger on desktop */
@media (min-width: 992px) {
    .gallery-item.featured-item:nth-child(4n+1),
    .gallery-item.featured-item:nth-child(4n+2) {
        grid-column: span 1;
    }
}

/* ===================================
   FILTER BUTTONS
   =================================== */

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 20px;
}

.btn-filter {
    padding: 12px 28px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: var(--white, #FFFFFF);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-filter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-filter:hover::before {
    width: 300px;
    height: 300px;
}

.btn-filter:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-filter.active {
    background: var(--primary-orange, #FF6B35);
    border-color: var(--primary-orange, #FF6B35);
    color: var(--white, #FFFFFF);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5);
    transform: translateY(-3px);
}

.btn-filter.active::before {
    display: none;
}

/* ===================================
   INSTAGRAM FEED SECTION - ULTRA PREMIUM
   =================================== */

.instagram-feed {
    background: #16213E !important;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.instagram-feed::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, 
        rgba(255, 107, 53, 0.08) 0%, 
        transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite;
}

.instagram-feed::after {
    content: '';
    position: absolute;
    bottom: -60%;
    right: -15%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, 
        rgba(0, 168, 150, 0.06) 0%, 
        transparent 70%);
    border-radius: 50%;
    animation: float 30s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
    50% { transform: translateY(-40px) translateX(30px) scale(1.1); }
}

.instagram-feed .container {
    position: relative;
    z-index: 1;
}

.instagram-feed .section-title,
.instagram-feed h2.section-title,
section.instagram-feed .section-title {
    font-size: 3rem !important;
    font-weight: 900 !important;
    color: #FFFFFF !important;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif !important;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

.instagram-feed .section-subtitle,
.instagram-feed p.section-subtitle,
section.instagram-feed .section-subtitle {
    font-size: 1.5rem !important;
    color: #FF6B35 !important;
    font-weight: 800 !important;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.instagram-feed p,
.instagram-feed .container p,
section.instagram-feed p {
    color: #FFFFFF !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    max-width: 750px;
    margin: 0 auto 32px;
    font-weight: 400 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    opacity: 0.95 !important;
}

.instagram-feed .btn-outline-primary {
    border: 2px solid var(--primary-orange, #FF6B35);
    color: var(--white, #FFFFFF);
    background: var(--primary-orange, #FF6B35);
    font-weight: 700;
    padding: 14px 36px;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    position: relative;
    overflow: hidden;
}

.instagram-feed .btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-teal, #00A896);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.instagram-feed .btn-outline-primary:hover::before {
    width: 400px;
    height: 400px;
}

.instagram-feed .btn-outline-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 168, 150, 0.5);
    border-color: var(--primary-teal, #00A896);
}

.instagram-feed .btn-outline-primary i,
.instagram-feed .btn-outline-primary span {
    position: relative;
    z-index: 1;
}

.instagram-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.instagram-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--primary-orange, #FF6B35) 0%, 
        var(--primary-red, #E63946) 50%,
        var(--primary-teal, #00A896) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.instagram-item:hover {
    transform: scale(1.12) translateY(-8px);
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.6);
    z-index: 10;
    border-color: var(--primary-orange, #FF6B35);
}

.instagram-item:hover::before {
    opacity: 0.15;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.instagram-item:hover img {
    transform: scale(1.2) rotate(2deg);
}

.instagram-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 107, 53, 0.9) 0%, 
        rgba(230, 57, 70, 0.85) 40%, 
        rgba(0, 168, 150, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.instagram-item:hover .instagram-item-overlay {
    opacity: 1;
}

.instagram-icon {
    color: var(--white, #FFFFFF);
    font-size: 3.5rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.instagram-item:hover .instagram-icon {
    transform: scale(1.4) rotate(360deg);
    animation: none;
}

/* ===================================
   CTA SECTION - PREMIUM DESIGN
   =================================== */

.gallery-cta {
    background: linear-gradient(135deg, 
        var(--primary-orange, #FF6B35) 0%, 
        var(--primary-red, #E63946) 50%,
        var(--primary-teal, #00A896) 100%);
    color: var(--white, #FFFFFF);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.gallery-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.gallery-cta::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-30px) translateX(20px); }
}

.cta-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.cta-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--white, #FFFFFF);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
}

.cta-card p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    line-height: 1.6;
}

.cta-card .btn-light {
    font-weight: 700;
    padding: 16px 40px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    border-radius: 50px;
    background: var(--white, #FFFFFF);
    color: var(--primary-orange, #FF6B35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-card .btn-light:hover {
    background: var(--primary-teal, #00A896);
    color: var(--white, #FFFFFF);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 168, 150, 0.4);
}

/* ===================================
   LOADING SPINNER
   =================================== */

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--medium-gray, #E9ECEF);
    border-top: 6px solid var(--primary-orange, #FF6B35);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

/* Large tablets and small desktops */
@media (max-width: 1199px) {
    .gallery-card img {
        height: 280px;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .cta-card h2 {
        font-size: 2rem;
    }
}

/* Tablets */
@media (max-width: 991px) {
    .gallery-main {
        padding: 60px 0;
    }
    
    .gallery-card img {
        height: 280px;
    }
    
    .instagram-feed {
        padding: 100px 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-subtitle {
        font-size: 1.3rem;
    }
    
    .cta-card {
        padding: 40px 30px;
    }
    
    .cta-card h2 {
        font-size: 1.75rem;
    }
}

/* Mobile devices */
@media (max-width: 767px) {
    .gallery-main {
        padding: 40px 0;
    }
    
    .gallery-card img {
        height: 240px;
    }
    
    .gallery-title {
        font-size: 1.1rem;
    }
    
    .gallery-description {
        font-size: 0.875rem;
    }
    
    .gallery-overlay {
        padding: 20px;
    }
    
    .filter-buttons {
        gap: 10px;
        margin-top: 24px;
    }
    
    .btn-filter {
        padding: 10px 22px;
        font-size: 0.875rem;
    }
    
    .instagram-feed {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.2rem;
    }
    
    .instagram-icon {
        font-size: 2.8rem;
    }
    
    .gallery-cta {
        padding: 60px 0;
    }
    
    .cta-card {
        padding: 32px 24px;
    }
    
    .cta-card h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .cta-card p {
        font-size: 1rem;
    }
    
    .cta-card .btn-light {
        width: 100%;
        margin-top: 20px;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .gallery-card img {
        height: 220px;
    }
    
    .gallery-title {
        font-size: 1rem;
    }
    
    .gallery-icon {
        font-size: 1.5rem;
        top: 16px;
        right: 16px;
    }
    
    .instagram-icon {
        font-size: 2.5rem;
    }
    
    .btn-filter {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* ===================================
   ACCESSIBILITY & PRINT
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .filter-buttons,
    .instagram-feed,
    .gallery-cta,
    .gallery-overlay {
        display: none !important;
    }
    
    .gallery-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-gray, #DEE2E6);
    }
}