/* ===================================
   DR House Lifting Gallery Styles
   WordPress-Ready with drh- prefix
   =================================== */

/* Use existing homepage CSS variables */
.drh-gallery-section {
    --drh-color-primary: #20d9e3;
    --drh-color-primary-dark: #1ab5bd;
    --drh-color-primary-light: #4de3eb;
    --drh-color-black: #000000;
    --drh-color-gray-900: #0a0a0a;
    --drh-color-gray-800: #1a1a1a;
    --drh-color-gray-700: #2a2a2a;
    --drh-color-gray-600: #3a3a3a;
    --drh-color-gray-500: #666666;
    --drh-color-gray-400: #999999;
    --drh-color-gray-300: #cccccc;
    --drh-color-gray-200: #e5e5e5;
    --drh-color-gray-100: #f5f5f5;
    --drh-color-white: #ffffff;

    --drh-spacing-xs: 0.5rem;
    --drh-spacing-sm: 1rem;
    --drh-spacing-md: 2rem;
    --drh-spacing-lg: 4rem;
    --drh-spacing-xl: 6rem;
    --drh-spacing-2xl: 8rem;

    --drh-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --drh-transition-fast: 0.2s ease;
    --drh-transition-base: 0.3s ease;
    --drh-transition-slow: 0.5s ease;

    --drh-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --drh-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --drh-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --drh-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);

    --drh-border-radius-sm: 4px;
    --drh-border-radius-md: 8px;
    --drh-border-radius-lg: 12px;

    --drh-max-width: 1600px;
}

/* ===================================
   Gallery Section
   =================================== */
.drh-gallery-section,
.drh-gallery-section *,
.drh-gallery-section *::before,
.drh-gallery-section *::after {
    box-sizing: border-box;
}
.drh-gallery-section {
    padding: var(--drh-spacing-2xl) 0;
    background: var(--drh-color-gray-100);
    font-family: var(--drh-font-sans);
}

.drh-container {
    max-width: var(--drh-max-width);
    margin: 0 auto;
    padding: 0 0.7875rem;
}

/* ===================================
   Section Header
   =================================== */
.drh-section-header {
    text-align: center;
    margin-bottom: var(--drh-spacing-xl);
    padding: var(--drh-spacing-lg) var(--drh-spacing-md) 0;
}

.drh-header-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--drh-spacing-xs);
    background: linear-gradient(135deg, var(--drh-color-primary) 0%, var(--drh-color-primary-dark) 100%);
    color: var(--drh-color-black);
    padding: var(--drh-spacing-xs) var(--drh-spacing-md);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.06rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(32, 217, 227, 0.3);
}

.drh-header-badge svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.drh-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--drh-color-black);
    margin-bottom: 1.06rem;
    line-height: 1.16;
}

.drh-section-subtitle {
    font-size: 1.2rem;
    color: var(--drh-color-gray-500);
    max-width: 700px;
    margin: 0 auto 2.12rem;
    line-height: 1.58;
}

.drh-header-features {
    display: flex;
    justify-content: center;
    gap: var(--drh-spacing-lg);
    flex-wrap: wrap;
    margin-top: 0;
}

.drh-header-feature {
    display: flex;
    align-items: center;
    gap: var(--drh-spacing-xs);
    color: var(--drh-color-gray-700);
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--drh-spacing-xs) var(--drh-spacing-md);
    background: var(--drh-color-gray-100);
    border-radius: var(--drh-border-radius-md);
    transition: all var(--drh-transition-base);
}

.drh-header-feature:hover {
    background: var(--drh-color-primary);
    color: var(--drh-color-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 217, 227, 0.3);
}

.drh-header-feature svg {
    width: 20px;
    height: 20px;
    color: var(--drh-color-primary);
    stroke-width: 2.5;
    transition: color var(--drh-transition-base);
}

.drh-header-feature:hover svg {
    color: var(--drh-color-black);
}

.drh-gradient-accent {
    margin: var(--drh-spacing-md) auto 0;
    max-width: 600px;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--drh-color-primary) 20%,
        var(--drh-color-primary-light) 50%,
        var(--drh-color-primary) 80%,
        transparent 100%
    );
    border-radius: 2px;
}

/* ===================================
   Gallery Grid - Mixed Featured Layout
   =================================== */
.drh-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--drh-spacing-md);
    margin-bottom: var(--drh-spacing-xl);
}

/* Row 1: Large Featured Image - Full Width */
.drh-featured-large {
    grid-column: span 12;
}

/* Row 2: Three Medium Images */
.drh-medium {
    grid-column: span 4;
}

/* Row 3: One Large Featured + Two Small */
.drh-featured-medium {
    grid-column: span 6;
}

.drh-small {
    grid-column: span 3;
}

/* Row 4: Four Grid Items */
.drh-grid-item {
    grid-column: span 3;
}

/* ===================================
   Gallery Item Styles
   =================================== */
.drh-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--drh-border-radius-lg);
    box-shadow: var(--drh-shadow-md);
    transition: all var(--drh-transition-base);
    cursor: pointer;
    background: var(--drh-color-white);
}

.drh-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--drh-shadow-xl);
}

.drh-gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Image aspect ratios for different sizes */
.drh-featured-large .drh-gallery-image-wrapper {
    aspect-ratio: 21/9;
}

.drh-medium .drh-gallery-image-wrapper,
.drh-featured-medium .drh-gallery-image-wrapper {
    aspect-ratio: 4/3;
}

.drh-small .drh-gallery-image-wrapper,
.drh-grid-item .drh-gallery-image-wrapper {
    aspect-ratio: 1/1;
}

.drh-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--drh-transition-slow);
}

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

/* ===================================
   Gallery Overlay & Icon
   =================================== */
.drh-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(32, 217, 227, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--drh-transition-base);
}

.drh-gallery-item:hover .drh-gallery-overlay {
    opacity: 1;
}

.drh-view-icon {
    width: 60px;
    height: 60px;
    background: var(--drh-color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform var(--drh-transition-base);
}

.drh-gallery-item:hover .drh-view-icon {
    transform: scale(1);
}

.drh-view-icon svg {
    width: 28px;
    height: 28px;
    color: var(--drh-color-black);
    stroke-width: 2.5;
}

/* ===================================
   Gallery CTA Section
   =================================== */
.drh-gallery-cta {
    text-align: center;
    padding: var(--drh-spacing-lg) var(--drh-spacing-md);
    background: var(--drh-color-white);
    border-radius: var(--drh-border-radius-lg);
    box-shadow: var(--drh-shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

.drh-cta-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--drh-color-black);
    margin-bottom: var(--drh-spacing-sm);
    line-height: 1.2;
}

.drh-cta-text {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--drh-color-gray-600);
    margin-bottom: var(--drh-spacing-lg);
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.drh-cta-buttons {
    display: flex;
    gap: var(--drh-spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.drh-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--drh-spacing-xs);
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--drh-border-radius-md);
    transition: all var(--drh-transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-decoration: none;
    font-family: var(--drh-font-sans);
}

.drh-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.drh-btn-primary {
    background: var(--drh-color-primary);
    color: var(--drh-color-black);
}

.drh-btn-primary:hover {
    background: var(--drh-color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(32, 217, 227, 0.4);
}

.drh-btn-secondary {
    background: var(--drh-color-white);
    color: var(--drh-color-black);
    border-color: var(--drh-color-gray-300);
}

.drh-btn-secondary:hover {
    background: var(--drh-color-gray-100);
    border-color: var(--drh-color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.drh-btn-secondary svg {
    color: var(--drh-color-primary);
}

/* ===================================
   Lightbox Modal
   =================================== */
.drh-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--drh-transition-base);
}

.drh-lightbox.active {
    display: flex;
    opacity: 1;
}

.drh-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drh-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--drh-border-radius-md);
    box-shadow: var(--drh-shadow-xl);
}

/* Lightbox Controls */
.drh-lightbox-close,
.drh-lightbox-prev,
.drh-lightbox-next {
    position: absolute;
    background: var(--drh-color-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--drh-transition-fast);
    z-index: 10000;
}

.drh-lightbox-close:hover,
.drh-lightbox-prev:hover,
.drh-lightbox-next:hover {
    background: var(--drh-color-primary-light);
    transform: scale(1.1);
}

.drh-lightbox-close svg,
.drh-lightbox-prev svg,
.drh-lightbox-next svg {
    width: 24px;
    height: 24px;
    color: var(--drh-color-black);
    stroke-width: 3;
}

.drh-lightbox-close {
    top: 30px;
    right: 30px;
}

.drh-lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.drh-lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.drh-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.drh-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Counter */
.drh-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--drh-color-white);
    background: rgba(0, 0, 0, 0.7);
    padding: var(--drh-spacing-xs) var(--drh-spacing-md);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ===================================
   Animations
   =================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .drh-gallery-section {
        --drh-spacing-lg: 3rem;
        --drh-spacing-xl: 4rem;
        --drh-spacing-2xl: 5rem;
    }

    .drh-gallery-grid {
        gap: var(--drh-spacing-sm);
    }

    /* Adjust grid for tablet */
    .drh-medium {
        grid-column: span 4;
    }

    .drh-featured-medium {
        grid-column: span 6;
    }

    .drh-small {
        grid-column: span 6;
    }

    .drh-grid-item {
        grid-column: span 6;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .drh-gallery-section {
        padding: var(--drh-spacing-lg) 0;
    }

    .drh-container {
        padding: 0 0.65625rem;
    }

    .drh-section-header {
        margin-bottom: var(--drh-spacing-lg);
        padding: var(--drh-spacing-md) var(--drh-spacing-sm) 0;
    }

    .drh-section-title {
        font-size: 2rem;
    }

    .drh-section-subtitle {
        font-size: 1rem;
    }

    .drh-header-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        margin-top: var(--drh-spacing-md);
    }

    .drh-header-features {
        gap: var(--drh-spacing-sm);
    }

    .drh-header-feature {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .drh-header-feature svg {
        width: 18px;
        height: 18px;
    }

    .drh-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--drh-spacing-sm);
    }

    /* Mobile grid layout */
    .drh-featured-large,
    .drh-featured-medium {
        grid-column: span 2;
    }

    .drh-medium,
    .drh-small,
    .drh-grid-item {
        grid-column: span 1;
    }

    /* Adjust aspect ratios for mobile */
    .drh-featured-large .drh-gallery-image-wrapper {
        aspect-ratio: 16/9;
    }

    .drh-medium .drh-gallery-image-wrapper,
    .drh-featured-medium .drh-gallery-image-wrapper,
    .drh-small .drh-gallery-image-wrapper,
    .drh-grid-item .drh-gallery-image-wrapper {
        aspect-ratio: 1/1;
    }

    /* Lightbox adjustments */
    .drh-lightbox-close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .drh-lightbox-prev,
    .drh-lightbox-next {
        width: 45px;
        height: 45px;
    }

    .drh-lightbox-prev {
        left: 15px;
    }

    .drh-lightbox-next {
        right: 15px;
    }

    .drh-lightbox-counter {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .drh-cta-title {
        font-size: 1.5rem;
    }

    .drh-cta-text {
        font-size: 1rem;
    }

    .drh-cta-buttons {
        flex-direction: column;
        gap: var(--drh-spacing-sm);
    }

    .drh-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .drh-view-icon {
        width: 50px;
        height: 50px;
    }

    .drh-view-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .drh-container {
        padding: 0 0.525rem;
    }

    .drh-section-header {
        padding: var(--drh-spacing-sm) var(--drh-spacing-xs) 0;
    }

    .drh-header-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .drh-header-features {
        flex-direction: column;
        gap: var(--drh-spacing-xs);
    }

    .drh-header-feature {
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
    }

    .drh-gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--drh-spacing-sm);
    }

    /* Single column on small mobile */
    .drh-featured-large,
    .drh-featured-medium,
    .drh-medium,
    .drh-small,
    .drh-grid-item {
        grid-column: span 1;
    }

    .drh-featured-large .drh-gallery-image-wrapper,
    .drh-featured-medium .drh-gallery-image-wrapper {
        aspect-ratio: 4/3;
    }

    .drh-medium .drh-gallery-image-wrapper,
    .drh-small .drh-gallery-image-wrapper,
    .drh-grid-item .drh-gallery-image-wrapper {
        aspect-ratio: 4/3;
    }

    .drh-gallery-cta {
        padding: var(--drh-spacing-md) var(--drh-spacing-sm);
    }

    .drh-cta-title {
        font-size: 1.3rem;
    }

    .drh-cta-text {
        font-size: 0.95rem;
    }

    .drh-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }

    .drh-btn svg {
        width: 18px;
        height: 18px;
    }

    .drh-lightbox-prev {
        left: 10px;
    }

    .drh-lightbox-next {
        right: 10px;
    }
}

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