/* ========================================
   PORTFOLIO - FRAMEWORK CARDS
   ======================================== */

/* Frameworks Section */
.frameworks-section {
    padding: 5rem 0 3rem;
    background: #f5f7fa;
}

.frameworks-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* ---- Framework Card ---- */
.framework-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.35s ease;
}

.framework-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* ---- Card Header (Dark Navy Bar) ---- */
.framework-header {
    background: linear-gradient(135deg, #1B3B6F 0%, #0f2847 60%, #132A4F 100%);
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.framework-title-area h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.framework-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}

.framework-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.95);
    color: #1B3B6F;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

/* ---- Card Body ---- */
.framework-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

/* ---- Section Titles inside cards ---- */
.framework-section h4,
.framework-results h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1B3B6F;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.framework-section h4 i,
.framework-results h4 i {
    font-size: 1.1rem;
    color: #00CED1;
}

.section-intro {
    font-size: 0.92rem;
    color: #666666;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* ---- Challenges Grid (❌ items) ---- */
.challenges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fde8e8;
    transition: all 0.25s ease;
}

.challenge-item:hover {
    background: #fee2e2;
    transform: translateX(3px);
}

.challenge-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1;
}

.challenge-item p {
    font-size: 0.88rem;
    color: #374151;
    margin: 0;
    line-height: 1.45;
}

.challenge-item p strong {
    color: #1f2937;
    font-weight: 700;
}

/* ---- Solutions Grid (✅ items) ---- */
.solutions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.solution-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    background: #f0fdfa;
    border-radius: 10px;
    border: 1px solid #ccfbf1;
    transition: all 0.25s ease;
}

.solution-item:hover {
    background: #e0faf5;
    transform: translateX(3px);
}

.solution-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1;
}

.solution-item p {
    font-size: 0.88rem;
    color: #374151;
    margin: 0;
    line-height: 1.45;
}

.solution-item p strong {
    color: #1f2937;
    font-weight: 700;
}

/* ---- Expected Results ---- */
.framework-results {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.result-item {
    text-align: center;
    padding: 1rem 0.75rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00CED1, #1B3B6F);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-item:hover {
    border-color: #00CED1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 206, 209, 0.15);
}

.result-item:hover::before {
    opacity: 1;
}

.result-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1B3B6F;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.result-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Frameworks CTA ---- */
.frameworks-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ========================================
   RESPONSIVE - Tablet
   ======================================== */
@media (max-width: 900px) {
    .frameworks-section {
        padding: 3.5rem 0 2.5rem;
    }

    .framework-header {
        padding: 1.75rem 2rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .framework-title-area h3 {
        font-size: 1.45rem;
    }

    .framework-body {
        padding: 2rem;
    }

    .challenges-grid,
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   RESPONSIVE - Mobile
   ======================================== */
@media (max-width: 576px) {
    .frameworks-section {
        padding: 2.5rem 0 2rem;
    }

    .frameworks-grid {
        gap: 2rem;
    }

    .framework-header {
        padding: 1.5rem 1.25rem;
    }

    .framework-title-area h3 {
        font-size: 1.2rem;
    }

    .framework-subtitle {
        font-size: 0.82rem;
    }

    .framework-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.9rem;
    }

    .framework-body {
        padding: 1.5rem 1.25rem;
        gap: 1.75rem;
    }

    .framework-section h4,
    .framework-results h4 {
        font-size: 1.05rem;
    }

    .challenge-item,
    .solution-item {
        padding: 0.7rem 0.85rem;
    }

    .challenge-item p,
    .solution-item p {
        font-size: 0.82rem;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .result-value {
        font-size: 1.15rem;
    }

    .result-label {
        font-size: 0.65rem;
    }

    .result-item {
        padding: 0.75rem 0.5rem;
    }

    .framework-results {
        padding: 1.25rem;
    }
}

/* ========================================
   VIDEO PORTFOLIO GALLERY
   ======================================== */

.video-portfolio {
    padding: 5rem 0 3rem;
    background: #ffffff;
}

/* Video Grid layout */
.video-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

/* For Long Form only */
.video-grid.layout-long-form {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .video-grid.layout-long-form {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid.layout-long-form {
        grid-template-columns: 1fr;
    }
}

/* For Shorts only */
.video-grid.layout-shorts {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

@media (max-width: 992px) {
    .video-grid.layout-shorts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid.layout-shorts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .video-grid.layout-shorts {
        grid-template-columns: 1fr;
    }
}

.video-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Shorts Phone Bezel Styling */
.video-item.shorts {
    border: 10px solid #282828;
    border-radius: 20px;
    box-shadow: inset 0 0 0 2px #000, 0 8px 25px rgba(0,0,0,0.15); /* inner shadow trick for screen edge */
}

.video-item.shorts:hover {
    box-shadow: inset 0 0 0 2px #000, 0 15px 35px rgba(0,0,0,0.25);
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
}

.video-item.long-form .thumbnail-wrapper {
    aspect-ratio: 16 / 9;
}

.video-item.shorts .thumbnail-wrapper {
    aspect-ratio: 9 / 16;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.95;
}

.video-item:hover .thumbnail-wrapper img {
    transform: scale(1.03);
    opacity: 0.85;
}

/* YouTube Style Play Button */
.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(220, 0, 0, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.yt-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px; /* triangle */
    border-color: transparent transparent transparent #ffffff;
    margin-left: 4px; /* Optical alignment */
}

/* On hover, pop the button slightly and make it pure red */
.video-item:hover .yt-play-btn {
    background-color: #ff0000;
    transform: translate(-50%, -50%) scale(1.05);
}

/* Load More Button Helpers */
.hidden-video {
    display: none !important;
}
.load-more-btn {
    min-width: 180px;
}

/* Lightbox Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 10000;
}

/* Adjust wrapper based on whether short or long form is clicked */
.modal-content.vertical-video {
    max-width: 450px;
}

.video-iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-content.vertical-video .video-iframe-container {
    padding-bottom: 177.78%; /* 9:16 Aspect Ratio */
}

.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #00CED1;
}

/* Hide animations */
.video-item {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .close-modal {
        top: -40px;
        right: 0px;
    }
}

/* ===== Thumbnail Design Work Section ===== */
.thumbnail-work-section {
    padding: 5rem 0;
}

.thumbnail-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.thumb-work-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.thumb-work-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.thumb-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.thumb-work-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .thumbnail-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .thumbnail-work-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}