/*
═══════════════════════════════════════════════════════════════════════════════
Portfolio Page - Custom Stylesheet
Author: Nehemiah Cionelo
Last Updated: 2026-01-12
Version: 1.0.0

FEATURES:
- Custom animated category buttons
- Expandable dropdown menus with smooth transitions
- Nested dropdown functionality
- Disabled state styling for coming soon items
- Mobile-friendly touch interactions
- Accessibility-focused design
═══════════════════════════════════════════════════════════════════════════════
*/

/* ================================
   PORTFOLIO SECTION
   ================================ */

.portfolio-section {
    position: relative;
    min-height: calc(100vh - 200px);
    padding: 6rem 0 8rem;
    background: radial-gradient(1200px 800px at 50% -10%, #182033 0%, #0b0c0e 55%);
    overflow: hidden;
}

/* ================================
   BACKGROUND VIDEO
   ================================ */

.portfolio-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-video-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0.45; /* Increased opacity for more visible video */
}

/* Portrait video optimization */
@media (min-aspect-ratio: 16/9) {
    .bg-video-player {
        width: 100%;
        height: auto;
    }
}

@media (max-aspect-ratio: 16/9) {
    .bg-video-player {
        width: auto;
        height: 100%;
    }
}

/* Dark overlay to ensure text readability */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(1200px 800px at 50% -10%, rgba(24, 32, 51, 0.75) 0%, rgba(11, 12, 14, 0.88) 55%);
    z-index: 1;
}

/* Ensure all content is above the video */
.portfolio-section .container {
    position: relative;
    z-index: 2;
}

.portfolio-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--marketing-red) 0%, var(--marketing-red-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.portfolio-categories {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ================================
   CATEGORY BUTTONS
   ================================ */

.category-item {
    position: relative;
    width: 100%;
}

.category-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--card);
    border: 2px solid rgba(255, 71, 87, 0.3);
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* Animated background effect */
.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.15), transparent);
    transition: left 0.6s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover:not(.disabled) {
    border-color: var(--marketing-red);
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 12px 32px rgba(255, 71, 87, 0.4);
    background: linear-gradient(135deg, var(--card) 0%, rgba(255, 71, 87, 0.1) 100%);
}

.category-btn:active:not(.disabled) {
    transform: translateY(-2px) translateX(2px);
}

.category-label {
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--marketing-red);
    transition: transform 0.3s ease;
}

.category-btn:hover:not(.disabled) .category-icon:not(.dropdown-arrow) {
    transform: translateX(8px);
}

/* Dropdown arrow animation */
.dropdown-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn.active .dropdown-arrow,
.sub-category-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* ================================
   CATEGORY INFO (Below College Sports)
   ================================ */

.category-info {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 71, 87, 0.05);
    border-left: 3px solid var(--marketing-red);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    animation: slideDown 0.4s ease;
}

/* ================================
   DROPDOWN CONTENT
   ================================ */

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                margin-top 0.4s ease;
    opacity: 0;
    margin-top: 0;
}

.dropdown-content.active {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
}

.dropdown-content.nested.active {
    margin-top: 0.75rem;
}

/* ================================
   SUB-CATEGORY BUTTONS
   ================================ */

.sub-category-item {
    margin-bottom: 0.75rem;
}

.sub-category-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: rgba(255, 71, 87, 0.08);
    border: 1.5px solid rgba(255, 71, 87, 0.25);
    border-radius: 12px;
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 0.75rem;
}

.sub-category-btn:hover:not(.disabled) {
    border-color: var(--marketing-red-light);
    transform: translateX(8px);
    background: rgba(255, 71, 87, 0.15);
}

.sub-category-label {
    font-size: 1.125rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.ugc-subtitle {
    font-size: 0.875rem;
    font-style: italic;
    font-weight: 400;
    color: var(--muted);
}

.sub-category-icon {
    font-size: 1.125rem;
    color: var(--marketing-red-light);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   VIDEO LINK BUTTONS (Nested Level)
   ================================ */

.video-link-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 71, 87, 0.05);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.video-link-btn:last-child {
    margin-bottom: 0;
}

.video-link-btn:hover:not(.disabled) {
    border-color: var(--marketing-red-light);
    transform: translateX(12px);
    background: rgba(255, 71, 87, 0.12);
}

.video-label {
    font-size: 1rem;
}

.video-icon {
    font-size: 1rem;
    color: var(--marketing-red-light);
    transition: transform 0.3s ease;
}

.video-link-btn:hover:not(.disabled) .video-icon {
    transform: translateX(4px);
}

/* ================================
   DISABLED STATE
   ================================ */

.category-btn.disabled,
.sub-category-btn.disabled,
.video-link-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(139, 145, 157, 0.2);
    background: rgba(139, 145, 157, 0.05);
}

.category-btn.disabled:hover,
.sub-category-btn.disabled:hover,
.video-link-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(139, 145, 157, 0.2);
    background: rgba(139, 145, 157, 0.05);
}

.category-btn.disabled::before,
.sub-category-btn.disabled::before,
.video-link-btn.disabled::before {
    display: none;
}

.coming-soon {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 400;
    font-style: italic;
    background: rgba(139, 145, 157, 0.15);
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
}

/* ================================
   ANIMATIONS
   ================================ */

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

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

/* Stagger animation for category items */
.category-item {
    animation: fadeIn 0.6s ease backwards;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }

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

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .portfolio-categories {
        max-width: 700px;
    }

    .category-btn {
        padding: 1.25rem 1.75rem;
        font-size: 1.125rem;
    }

    .category-label {
        font-size: 1.125rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .portfolio-section {
        padding: 4rem 0 6rem;
    }

    /* Reduce video opacity on mobile for better performance and readability */
    .bg-video-player {
        opacity: 0.3;
    }

    .video-overlay {
        background: radial-gradient(1200px 800px at 50% -10%, rgba(24, 32, 51, 0.85) 0%, rgba(11, 12, 14, 0.93) 55%);
    }

    .portfolio-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .portfolio-categories {
        gap: 1.25rem;
    }

    .category-btn {
        padding: 1.25rem 1.5rem;
        font-size: 1.125rem;
    }

    .category-label {
        font-size: 1.125rem;
    }

    .category-icon {
        font-size: 1.25rem;
    }

    .sub-category-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .sub-category-label {
        font-size: 1rem;
    }

    .ugc-subtitle {
        font-size: 0.8rem;
    }

    .video-link-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .category-info {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Reduce transform on mobile for better performance */
    .category-btn:hover:not(.disabled) {
        transform: translateY(-2px) translateX(2px);
    }

    .sub-category-btn:hover:not(.disabled) {
        transform: translateX(4px);
    }

    .video-link-btn:hover:not(.disabled) {
        transform: translateX(6px);
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .portfolio-title {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }

    .category-btn {
        padding: 1.125rem 1.25rem;
        font-size: 1rem;
    }

    .category-label {
        font-size: 1rem;
    }

    .sub-category-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .sub-category-label {
        font-size: 0.95rem;
    }

    .ugc-subtitle {
        font-size: 0.75rem;
    }

    .video-link-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .video-label {
        font-size: 0.875rem;
    }

    .coming-soon {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }

    .category-info {
        font-size: 0.875rem;
    }
}

/* iPhone SE (375px) */
@media (max-width: 375px) {
    .portfolio-title {
        font-size: 1.5rem;
    }

    .category-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .category-label {
        font-size: 0.95rem;
    }
}

/* ================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ================================ */

/* Focus states for keyboard navigation */
.category-btn:focus,
.sub-category-btn:focus,
.video-link-btn:focus {
    outline: 2px solid var(--marketing-red);
    outline-offset: 4px;
}

/* Touch-friendly tap highlight */
@media (hover: none) and (pointer: coarse) {
    .category-btn,
    .sub-category-btn,
    .video-link-btn {
        -webkit-tap-highlight-color: rgba(255, 71, 87, 0.2);
    }

    /* Disable hover effects on touch devices */
    .category-btn::before {
        display: none;
    }

    /* Ensure adequate touch targets */
    .category-btn,
    .sub-category-btn {
        min-height: 56px;
    }

    .video-link-btn {
        min-height: 48px;
    }
}
