/* Khan Stretch Ceilings - Gallery Page Mobile Styles */

@import url('home.css');

/* Global link styles */
a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

a:active {
    color: inherit;
    text-decoration: none;
}

/* Mobile Page Hero */
.page-hero {
    background: transparent;
    color: var(--gold-light);
    padding: 4rem 0 3rem;
    text-align: center;
    margin-top: 70px;
    margin-bottom: 2rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gold-light);
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.page-hero p {
    font-size: 1rem;
    color: var(--gold-light);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    line-height: 1.5;
}

/* Mobile Gallery Filters */
.gallery-filters {
    padding: 1.5rem 0;
    background: transparent;
    border-bottom: 1px solid rgba(63, 164, 80, 0.1);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-buttons::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--emerald-green);
    color: var(--emerald-green);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    touch-action: manipulation;
    min-height: 44px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--emerald-green);
    color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(80, 200, 120, 0.3);
}

/* Mobile Gallery Grid */
.gallery-grid {
    padding: 2rem 0;
    background: transparent;
}

.gallery-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: var(--light-gray);
    touch-action: manipulation;
}

.gallery-item:active {
    transform: scale(0.98);
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    position: relative;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--gold-light);
    padding: 1.5rem 1rem 1rem;
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    opacity: 0.9;
    line-height: 1.4;
}

.gallery-category {
    background: var(--emerald-green);
    color: var(--gold-light);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
}

/* Mobile Gallery Image Backgrounds */
.glossy-1 {
    background: linear-gradient(45deg, #ffffff, #f8f9fa),
                radial-gradient(circle at 30% 30%, rgba(80, 200, 120, 0.2), transparent 50%);
    background-blend-mode: overlay;
}

.glossy-2 {
    background: linear-gradient(135deg, #1a1a1a, #333333),
                linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
}

.glossy-3 {
    background: linear-gradient(45deg, #e3f2fd, #ffffff),
                radial-gradient(circle at 70% 20%, rgba(33, 150, 243, 0.3), transparent 60%);
}

.matte-1 {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.matte-2 {
    background: linear-gradient(135deg, #f3e5ab, #ede0c8);
}

.matte-3 {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
}

.multilevel-1 {
    background: linear-gradient(135deg, var(--primary-green), var(--velvet-green));
    position: relative;
}

.multilevel-1::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 25%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.multilevel-1::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 50%;
    height: 35%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.multilevel-2 {
    background: linear-gradient(45deg, var(--emerald-green), var(--velvet-green), var(--primary-green));
    position: relative;
}

.multilevel-3 {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    position: relative;
}

.photo-1 {
    background: radial-gradient(circle at center, #1a237e, #3949ab, #5c6bc0);
    position: relative;
}

.photo-1::before,
.photo-1::after {
    content: '✨';
    position: absolute;
    color: var(--gold-light);
    font-size: 1.2rem;
    animation: twinkle 2s infinite;
}

.photo-1::before {
    top: 20%;
    left: 25%;
}

.photo-1::after {
    bottom: 25%;
    right: 20%;
    animation-delay: 1s;
}

.photo-2 {
    background: linear-gradient(135deg, #87ceeb, #ffffff, #e0f6ff);
    position: relative;
}

.photo-2::before {
    content: '☁️';
    position: absolute;
    top: 20%;
    left: 20%;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.photo-2::after {
    content: '☁️';
    position: absolute;
    bottom: 30%;
    right: 30%;
    font-size: 1.2rem;
    animation: float 3s ease-in-out infinite 1.5s;
}

.photo-3 {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Mobile Gallery Stats */
.gallery-stats {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(80, 200, 120, 0.05), var(--light-gray));
}

.gallery-stats h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--gold-light);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--emerald-green);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
    line-height: 1.3;
}

/* Mobile CTA Section */
.cta-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-green), var(--velvet-green));
    color: var(--gold-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.cta-section p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--light-green);
    position: relative;
    z-index: 2;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.cta-section .btn-primary {
    background: var(--accent-gold);
    color: var(--dark-gray);
    border: none;
    width: 100%;
    max-width: 280px;
}

.cta-section .btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.cta-section .btn-secondary {
    background: transparent;
    color: var(--gold-light);
    border: 2px solid var(--gold-light);
    width: 100%;
    max-width: 280px;
}

.cta-section .btn-secondary:hover {
    background: var(--gold-light);
    color: var(--primary-green);
    transform: translateY(-2px);
}

/* Mobile Gallery Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    touch-action: manipulation;
}

.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 1rem;
    width: 95%;
    max-width: 500px;
    background: var(--gold-light);
    border-radius: 15px;
    animation: slideIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

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

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
    background: var(--gold-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.close:hover {
    color: var(--primary-green);
    background: var(--light-gray);
}

#modal-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

#modal-info h3 {
    color: var(--primary-green);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#modal-info p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Mobile Touch Gestures */
.gallery-item {
    -webkit-tap-highlight-color: transparent;
}

.modal-content {
    -webkit-overflow-scrolling: touch;
}

/* Mobile Load More Button */
.load-more {
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    background: var(--emerald-green);
    color: var(--gold-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    min-height: 44px;
}

.load-more-btn:hover {
    background: var(--velvet-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(80, 200, 120, 0.4);
}

.load-more-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .page-hero {
        padding: 4rem 0 2.5rem;
    }
    
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        padding: 1.5rem 0;
    }
    
    .gallery-items {
        gap: 1rem;
        padding: 0 0.8rem;
    }
    
    .gallery-image {
        height: 180px;
    }
    
    .gallery-overlay {
        padding: 1rem 0.8rem 0.8rem;
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.8rem;
    }
    
    .filter-buttons {
        padding: 0 0.8rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .stats-grid {
        padding: 0 0.8rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .gallery-stats h2,
    .cta-section h2 {
        font-size: 1.6rem;
    }
    
    .modal-content {
        margin: 15% auto;
        width: 98%;
        padding: 0.8rem;
    }
    
    #modal-image {
        height: 200px;
    }
    
    .cta-buttons {
        padding: 0 0.8rem;
    }
}

@media (max-width: 360px) {
    .page-hero h1 {
        font-size: 1.6rem;
    }
    
    .gallery-image {
        height: 160px;
    }
    
    .gallery-overlay {
        padding: 0.8rem 0.6rem 0.6rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 1.2rem 0.8rem;
    }
    
    .modal-content {
        margin: 20% auto;
    }
    
    #modal-image {
        height: 180px;
    }
}

/* Mobile Performance Optimizations */
.gallery-item {
    will-change: transform;
}

.gallery-image {
    will-change: transform;
}

/* Mobile Accessibility */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .modal,
    .modal-content,
    .cta-section::before {
        animation: none;
        transition: none;
    }
    
    .photo-1::before,
    .photo-1::after,
    .photo-2::before,
    .photo-2::after,
    .photo-3 {
        animation: none;
    }
}

/* Mobile Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gallery-item,
    .stat-item,
    .modal-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .gallery-overlay h3,
    #modal-info h3 {
        color: var(--light-green);
    }
    
    .close {
        background: #2a2a2a;
        color: #e0e0e0;
    }
}