/* Custom Scrollbar for Modals */
.modal-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.project-modal-container::-webkit-scrollbar {
    width: 12px;
}

.modal-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.project-modal-container::-webkit-scrollbar-track {
    background: #0A0A0A;
}

.modal-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.project-modal-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
    border: 2px solid #0A0A0A;
}

.modal-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.project-modal-container::-webkit-scrollbar-thumb:hover {
    background: #ffd54f;
}

/* Firefox */
.modal-container,
.modal-content,
.project-modal-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #0A0A0A;
}

/* Modal Pop-up Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: #000;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10001;
    transition: all 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--secondary-red);
    color: #fff;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

.modal-image {
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-right: 2px solid var(--primary);
    overflow: hidden;
}

.modal-image img {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 600px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(253, 192, 42, 0.3));
}

/* Responsive Modal */
@media screen and (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
    }

    .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .modal-image {
        border-right: none;
        border-bottom: 2px solid var(--primary);
        padding: 20px;
        max-height: 250px;
    }

    .modal-image img {
        max-height: 200px;
        width: auto;
        height: auto;
    }

    .modal-form-wrapper {
        padding: 30px 20px;
        overflow-y: auto;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .modal-container {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-image {
        max-height: 200px;
        padding: 15px;
    }

    .modal-image img {
        max-height: 150px;
    }

    .modal-form-wrapper {
        padding: 20px 15px;
    }

    .modal-title {
        font-size: 20px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-whatsapp,
    .btn-email {
        width: 100%;
    }
}

.modal-form-wrapper {
    padding: 60px 40px;
}

.modal-title {
    font-size: 36px;
    color: var(--primary);
    margin: 0 0 10px;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    text-transform: uppercase;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    color: var(--text);
    font-family: 'NotoSansHans-Regular', sans-serif;
    font-size: 16px;
    transition: all 0.3s;
}

.modal-form input:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.btn-whatsapp,
.btn-email {
    padding: 15px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.btn-email {
    background: var(--primary);
    color: #000;
}

.btn-email:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 192, 42, 0.4);
}

.modal-success {
    background: var(--secondary-green);
    color: #fff;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

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

/* Project Modal */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.project-modal-container {
    background: #0A0A0A;
    border: 2px solid var(--primary);
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.project-modal-close:hover {
    background: var(--primary);
    color: #000;
    transform: rotate(90deg);
}

.project-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
}

.project-modal-image {
    width: 100%;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a1a 100%);
}

.project-modal-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(253, 192, 42, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.project-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-modal-image:hover img {
    transform: scale(1.05);
}

.project-modal-info {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0A0A0A 0%, #111 100%);
    position: relative;
}

.project-modal-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
}

.project-modal-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(253, 192, 42, 0.2);
    position: relative;
}

.project-modal-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary);
}

.project-modal-title {
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(253, 192, 42, 0.3);
    line-height: 1.2;
}

.project-modal-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(253, 192, 42, 0.15) 0%, rgba(253, 192, 42, 0.05) 100%);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: bold;
    border: 1px solid rgba(253, 192, 42, 0.3);
    box-shadow: 0 4px 15px rgba(253, 192, 42, 0.1);
}

.project-modal-body {
    flex: 1;
    margin-bottom: 30px;
}

.project-modal-description {
    color: var(--text-muted);
    line-height: 2;
    margin-bottom: 35px;
    font-size: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    position: relative;
}

.project-modal-description::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 48px;
    color: var(--primary);
    opacity: 0.2;
    font-family: serif;
    line-height: 1;
}

.project-modal-stats {
    margin-bottom: 30px;
}

.project-stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(253, 192, 42, 0.08) 0%, rgba(253, 192, 42, 0.02) 100%);
    border: 2px solid rgba(253, 192, 42, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(253, 192, 42, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-stat-item:hover::before {
    left: 100%;
}

.project-stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 192, 42, 0.2);
}

.project-stat-item i {
    font-size: 40px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(253, 192, 42, 0.5));
    transition: transform 0.3s ease;
}

.project-stat-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.project-stat-item h4 {
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    font-size: 42px;
    color: var(--primary);
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 15px rgba(253, 192, 42, 0.4);
}

.project-stat-item p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.project-modal-features {
    margin-top: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-modal-features h3 {
    font-family: 'AlimamaShuHeiTi-Bold', sans-serif;
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-modal-features h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.project-modal-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-modal-features li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 10px;
}

.project-modal-features li:last-child {
    border-bottom: none;
}

.project-modal-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.project-modal-features li:hover {
    color: var(--primary);
    padding-left: 20px;
}

.project-modal-features li:hover::before {
    width: 8px;
}

.project-modal-features li i {
    color: var(--primary);
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(253, 192, 42, 0.5));
    transition: transform 0.3s ease;
}

.project-modal-features li:hover i {
    transform: scale(1.2) rotate(10deg);
}

.project-modal-footer {
    display: flex;
    gap: 15px;
    padding-top: 30px;
    border-top: 2px solid rgba(253, 192, 42, 0.2);
    margin-top: auto;
}

.project-modal-footer .btn {
    flex: 1;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.project-modal-footer .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.project-modal-footer .btn:hover::before {
    width: 300px;
    height: 300px;
}

.project-modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(253, 192, 42, 0.3);
    color: var(--primary);
}

.project-modal-footer .btn-secondary:hover {
    background: rgba(253, 192, 42, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 192, 42, 0.3);
}

@media screen and (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
    }

    .modal-image {
        border-right: none;
        border-bottom: 2px solid var(--primary);
        padding: 30px;
    }

    .modal-image img {
        max-width: 100%;
        max-height: 250px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .modal-form-wrapper {
        padding: 40px 30px;
    }

    .modal-title {
        font-size: 28px;
    }

    .form-actions {
        grid-template-columns: 1fr;
    }

    .project-modal-content {
        grid-template-columns: 1fr;
    }
    
    .project-modal-image {
        min-height: 300px;
    }
    
    .project-modal-info {
        padding: 30px 20px;
    }
    
    .project-modal-title {
        font-size: 28px;
    }
    
    .project-modal-category {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .project-modal-description {
        font-size: 14px;
        padding: 15px;
    }
    
    .project-stat-item {
        padding: 20px;
    }
    
    .project-stat-item i {
        font-size: 32px;
    }
    
    .project-stat-item h4 {
        font-size: 32px;
    }
    
    .project-modal-features {
        padding: 20px;
    }
    
    .project-modal-features h3 {
        font-size: 18px;
    }
    
    .project-modal-footer {
        flex-direction: column;
    }
    
    .project-modal-footer .btn {
        width: 100%;
    }
}
