/* Base Project Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--second-bg-color);
    border: 1px solid var(--main-color);
    border-radius: 2rem;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--main-color), #00d4ff);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4ff, var(--main-color));
    box-shadow: 0 0 10px rgba(0, 238, 255, 0.5);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 238, 255, 0.3);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(0, 238, 255, 0.2);
    border-color: var(--main-color);
}

.modal-header {
    position: relative;
    padding: 3rem;
    border-bottom: 1px solid rgba(0, 238, 255, 0.1);
}

.modal-project-image {
    width: 100%;
    aspect-ratio: 16/9; /* Match demo product carousel */
    object-fit: cover;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
}

/* Updated Header Info for Modal */
.modal-category {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.modal-body {
    padding: 3rem;
}

/* Status Badge */
.modal-status {
    display: inline-block;
    margin-left: 1rem;
}

.modal-status .status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-in-progress {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-featured {
    background: rgba(0, 238, 255, 0.2);
    color: var(--main-color);
    border: 1px solid rgba(0, 238, 255, 0.3);
}

/* Modal Links & Buttons */
.modal-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    border-radius: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.live-btn {
    background: linear-gradient(135deg, var(--main-color), #00d4ff);
    color: var(--bg-color);
}

.live-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 238, 255, 0.4);
}

.repo-btn {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    border: 1px solid rgba(0, 238, 255, 0.3);
}

.repo-btn:hover {
    background: rgba(0, 238, 255, 0.1);
    border-color: var(--main-color);
    transform: translateY(-2px);
}

/* ====================================================================
   Case Study Modal Styles
   ==================================================================== */

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section h3, 
.modal-section h4 {
    color: var(--main-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-section h3 {
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(0, 238, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.modal-section p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.4rem;
}

/* Grid Layout */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

/* Problem & Solution Boxes */
.problem-box, 
.solution-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-box:hover, 
.solution-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 238, 255, 0.3);
}

.problem-box h4 i, 
.solution-box h4 i {
    margin-right: 0.5rem;
}

.problem-box h4 {
    color: #ff6b6b; /* Soft Red for problem */
    font-size: 1.6rem;
}

.solution-box h4 {
    color: #4ecdc4; /* Soft Teal for solution */
    font-size: 1.6rem;
}

/* Role Badge */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(0, 238, 255, 0.1), rgba(0, 238, 255, 0.05));
    border: 1px solid var(--main-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.2);
}

/* Contribution List */
.contribution-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.contribution-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.8rem;
    border-left: 3px solid var(--main-color);
    font-size: 1.4rem;
}

.contribution-list li i {
    color: var(--main-color);
    margin-top: 0.3rem;
}

/* ============================
   Carousel (Product Demo)
   ============================ */

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid rgba(0, 238, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16/9; /* Maintain aspect ratio */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain, depending on preference */
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 238, 255, 0.5);
    color: var(--main-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: rgba(0, 238, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Indicators (Dots) */
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--second-bg-color);
    border: 1px solid var(--main-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--main-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--main-color);
}

.demo-caption {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 1rem;
    font-style: italic;
}

/* Outcome Box */
.outcome-box {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), transparent);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.outcome-box h3 {
    color: #4caf50;
    border-bottom: none;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.outcome-box p {
    font-size: 1.4rem;
    font-weight: 500;
}

/* Tech Tags */
.modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-tag {
    padding: 0.5rem 1.2rem;
    background: rgba(0, 238, 255, 0.1);
    border: 1px solid rgba(0, 238, 255, 0.3);
    border-radius: 0.8rem;
    font-size: 1.2rem;
    color: var(--text-color);
}
