/* Modal and Carousel Styles */

/* Project Image Carousel */
.project-image-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #475569;
    font-size: 3rem;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 8px rgba(30, 64, 175, 0.2);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #1e40af;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.carousel-dot:hover {
    background: rgba(0, 212, 255, 0.8);
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal.active {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.8);
    transform: scale(1.1);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.modal-description {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 1.1rem;
}

.modal-carousel {
    position: relative;
    height: 400px;
    max-height: 50vh;
    overflow: hidden;
    flex-shrink: 1;
    min-height: 300px;
}

.modal-carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.modal-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #475569;
    font-size: 3rem;
}

.modal-carousel-slide.active {
    opacity: 1;
}

.modal-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
}

/* Better styling for single image modals */
.modal-carousel:not(:has(.modal-carousel-btn)) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-carousel:not(:has(.modal-carousel-btn)) .modal-carousel-slide {
    position: relative;
    opacity: 1;
}

.modal-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-carousel-btn:hover {
    background: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

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

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

.modal-carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.modal-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-carousel-dot.active {
    background: #1e40af;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.modal-carousel-dot:hover {
    background: rgba(0, 212, 255, 0.8);
    transform: scale(1.2);
}

.modal-footer {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    margin-top: auto;
    flex-shrink: 0;
    min-height: fit-content;
    overflow: visible;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-links {
    display: flex;
    gap: 1rem;
}

.modal-links .github {
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    min-height: 42px;
    box-sizing: border-box;
}

.modal-links .github:hover {
    background: #475569;
    border-color: #1e40af;
    color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.modal-links .live {
    background: #1e40af;
    color: #ffffff;
    border: 1px solid #1e3a8a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    min-height: 42px;
    box-sizing: border-box;
}

.modal-links .live:hover {
    background: #1e3a8a;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.4);
}

