/* Modal moderno */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal[style*="block"] {
    display: flex !important;
}

.modal-content {
    background: var(--white);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    transform: scale(0.9);
    animation: modalAppear 0.3s ease forwards;
    display: flex;
    flex-direction: column;
}

@keyframes modalAppear {
    to {
        transform: scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: var(--white);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.modal-body p {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

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

.btn-submit {
    background: linear-gradient(135deg, var(--accent-red), var(--light-red));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Product Modal Styles */
.product-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.product-modal[style*="block"] {
    display: flex !important;
}

.product-modal-content {
    background: var(--white);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    transform: scale(0.9);
    animation: modalAppear 0.3s ease forwards;
    display: flex;
    flex-direction: column;
}

.product-modal-header {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.product-modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-modal-header .product-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.product-modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.product-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.product-compatibility {
    margin-bottom: 3rem;
}

.product-compatibility h3 {
    text-align: center;
    color: var(--gray-800);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.compatibility-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.compatibility-item:hover {
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

.compatibility-item h4 {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.os-logos {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.os-logo {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.screenshots-section {
    margin-bottom: 2rem;
}

.screenshots-section h3 {
    text-align: center;
    color: var(--gray-800);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.screenshot-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 16/10;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
    opacity: 1;
}

.screenshot-title {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.product-modal-cta {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.btn-product-modal {
    background: linear-gradient(135deg, var(--accent-red), var(--light-red));
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    font-family: inherit;
}

.btn-product-modal:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-product-modal.secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-product-modal.secondary:hover {
    background: var(--gray-200);
}

/* Lightbox for screenshots */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 3001;
}

/* Responsive product modal */
@media (max-width: 768px) {
    .product-modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
    }

    .product-modal-header,
    .product-modal-body {
        padding: 1.5rem;
    }

    .product-modal-header h2 {
        font-size: 1.5rem;
    }

    .compatibility-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .screenshots-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn-product-modal {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }
}

/* Custom Solution Modal Styles */
.custom-solution-modal {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit i {
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}