/* Video Section Styles */
.hh-videos-section {
    padding: 40px 0;
}

.hh-videos-header {
    text-align: center;
    margin-bottom: 40px;
}

.hh-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.hh-section-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.hh-video-grid {
    display: grid;
    gap: 24px;
    margin: 0 auto 40px auto;
    max-width: 900px; /* Constrain width to make cards smaller (approx 280px each for 3 cols) */
}

/* Landscape grid wider to keep professional aspect */
.hh-format-landscape .hh-video-grid {
    max-width: 1200px; /* Approx 384px each for 3 cols */
}

.hh-grid-cols-1 { grid-template-columns: 1fr; }
.hh-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.hh-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.hh-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.hh-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.hh-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1200px) {
    .hh-grid-cols-4, .hh-grid-cols-5, .hh-grid-cols-6 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
    .hh-video-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .hh-format-landscape .hh-video-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 767px) {
    .hh-video-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .hh-format-landscape .hh-video-grid { grid-template-columns: repeat(1, 1fr) !important; gap: 20px; }
}

.hh-video-item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    position: relative;
    cursor: pointer;
}

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

/* Card Dealing Animation */
.hh-video-item.hh-card-entering {
    opacity: 0 !important;
    transform: translateY(150px) scale(0.7) rotate(8deg) !important;
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    pointer-events: none;
}

.hh-video-item.hh-card-dealt {
    opacity: 1 !important;
    transform: translateY(0) scale(1) rotate(0deg) !important;
    pointer-events: auto;
}

.hh-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 177.77%; /* 9:16 Aspect Ratio for Shorts/Reels */
    background: #000;
}

.hh-format-landscape .hh-video-thumbnail {
    padding-top: 56.25%; /* 16:9 Aspect Ratio for standard video */
}

.hh-thumbnail-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.1) 100%);
    transition: background 0.4s ease;
    z-index: 1;
}

.hh-video-item:hover .hh-video-thumbnail::before {
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2) 100%);
}

.hh-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(217, 13, 14, 0.85); /* Frosted glass effect */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(217, 13, 14, 0.4);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.9;
    z-index: 2;
}

.hh-video-item:hover .hh-play-button {
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(217, 13, 14, 1);
    box-shadow: 0 12px 32px rgba(217, 13, 14, 0.6);
    opacity: 1;
}

.hh-play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

.hh-video-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.hh-video-content-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 16px;
    z-index: 2;
    pointer-events: none;
}

.hh-video-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Load More Card (Red Premium Overlay) */
.hh-load-more-card {
    background: linear-gradient(135deg, #EE3442 0%, #D42835 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 20px;
    z-index: 1;
    aspect-ratio: 9 / 16;
}

.hh-format-landscape .hh-load-more-card {
    aspect-ratio: 16 / 9;
}

/* Professional Landscape Grid defaults */
.hh-format-landscape .hh-video-grid {
    grid-template-columns: repeat(3, 1fr) !important; /* Force 3 columns on desktop for larger cards */
    gap: 30px; /* More breathing room */
}

.hh-load-more-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #FF4554 0%, #B81E29 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hh-load-more-card:hover::before {
    opacity: 1;
}

.hh-load-more-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(238, 52, 66, 0.4);
}

.hh-load-more-circle {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EE3442;
    margin-bottom: 24px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.hh-load-more-circle svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

/* Subtle Concentric Rings */
.hh-load-more-circle::before,
.hh-load-more-circle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: all 0.4s ease;
}

.hh-load-more-circle::before {
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.05);
}

.hh-load-more-circle::after {
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.02);
}

.hh-load-more-card:hover .hh-load-more-circle {
    transform: scale(1.05) translateX(4px);
}

.hh-load-more-card:hover .hh-load-more-circle svg {
    transform: translateX(2px);
}

.hh-load-more-card:hover .hh-load-more-circle::before {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(1.05);
}

.hh-load-more-card:hover .hh-load-more-circle::after {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transform: translate(-50%, -50%) scale(1.02);
}

.hh-load-more-content {
    position: relative;
    z-index: 2;
}

.hh-load-more-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.hh-load-more-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

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

/* Facebook-Style Modal */
.hh-video-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hh-video-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.hh-video-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000001;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hh-video-modal-close-btn:hover {
    background: #EE3442;
    color: white;
    transform: scale(1.1);
}

.hh-facebook-style {
    position: relative;
}

#hh-video-modal .hh-video-modal-content {
    width: 95%;
    max-width: 800px;
    height: auto; /* Let content dictate height up to max-height */
    max-height: 85vh; /* Keep it nicely in the fold */
    z-index: 1000000;
    background: #1c1c1e; /* Apple-style dark material base */
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
    transition: max-width 0.3s ease;
}

/* Landscape Modal Override */
#hh-video-modal.hh-modal-landscape .hh-video-modal-content {
    max-width: 1100px;
}

/* Player Column */
.hh-modal-player-col {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hh-video-container {
    width: 100%;
    height: 100%;
    min-height: 300px; /* Prevent it from collapsing completely */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hh-video-container video {
    width: 100%;
    height: 100%;
    max-height: 85vh; /* Strict constraint */
    object-fit: contain; /* ensures video fits entirely without distortion */
}

/* Custom Player Controls */
.hh-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px 20px 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.hh-modal-player-col:hover .hh-custom-controls {
    opacity: 1;
}

.hh-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
}

.hh-progress-filled {
    height: 100%;
    background: #D90D0E;
    border-radius: 3px;
    width: 0%;
    position: relative;
}

.hh-progress-filled::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: #D90D0E;
    border-radius: 50%;
    transition: transform 0.2s;
}

.hh-progress-bar:hover .hh-progress-filled::after {
    transform: translateY(-50%) scale(1);
}

.hh-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hh-control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.hh-control-btn:hover {
    opacity: 1;
}

.hh-control-btn svg {
    width: 24px;
    height: 24px;
}

.hh-time-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
    opacity: 0.9;
}

.hh-spacer {
    flex: 1;
}

/* Center Play Overlay */
.hh-center-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hh-video-container.is-playing .hh-center-play-overlay {
    opacity: 0;
}

/* Modal Nav Buttons */
.hh-modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hh-video-container:hover .hh-modal-nav-btn {
    opacity: 1;
}

.hh-modal-nav-btn:hover {
    background: rgba(238, 52, 66, 0.9);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(238, 52, 66, 1);
}

.hh-modal-nav-btn svg {
    width: 24px;
    height: 24px;
}

.hh-modal-prev {
    left: 20px;
}

.hh-modal-next {
    right: 20px;
}

.hh-play-button-large {
    width: 80px;
    height: 80px;
    background: rgba(217, 13, 14, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.hh-play-button-large:hover {
    transform: scale(1.1);
}

.hh-play-button-large svg {
    width: 36px;
    height: 36px;
    margin-left: 6px;
}

/* Content Column (Right Side) */
.hh-modal-content-col {
    width: 340px; /* Slightly wider for better reading */
    background: #1c1c1e; /* Premium dark material */
    display: flex;
    flex-direction: column;
    color: #f5f5f7;
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.05);
}

/* Custom Sleek Scrollbar */
.hh-modal-content-col::-webkit-scrollbar {
    width: 6px;
}
.hh-modal-content-col::-webkit-scrollbar-track {
    background: transparent;
}
.hh-modal-content-col::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}
.hh-modal-content-col::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

.hh-modal-header {
    padding: 30px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hh-modal-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.hh-modal-meta {
    color: #86868b;
    font-size: 14px;
    font-weight: 500;
}

.hh-modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.hh-modal-desc {
    color: #a1a1a6;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.hh-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.hh-share-btn {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: none;
    color: #e4e6eb;
    gap: 8px;
}

.hh-share-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    #hh-video-modal .hh-video-modal-content,
    .hh-facebook-style {
        flex-direction: column;
        height: 95vh;
        max-height: 95vh;
    }
    
    .hh-modal-content-col {
        width: 100%;
        height: auto;
        flex: 1; /* Allow content to take remaining space and scroll */
    }
    
    .hh-modal-player-col {
        flex: none;
        height: 45vh;
    }
}

@media (max-width: 767px) {
    .hh-video-modal {
        padding: 0; /* Remove padding to make modal full screen */
    }

    #hh-video-modal .hh-video-modal-content,
    .hh-facebook-style {
        height: 100dvh;
        max-height: 100dvh;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .hh-modal-player-col {
        height: 40vh; /* Better ratio for small portrait screens */
    }
    
    .hh-video-container {
        min-height: auto;
    }

    .hh-video-container video {
        max-height: 40vh;
    }

    .hh-video-modal-close-btn {
        top: 16px;
        right: 16px;
        left: auto; /* Ensure it stays on the right */
        background: rgba(0, 0, 0, 0.6); /* Better visibility over video */
    }
    
    .hh-modal-header {
        padding: 20px 16px 16px;
    }

    .hh-modal-body {
        padding: 16px;
    }
}
