/* Card modal styles */
.feature-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.card-modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow-y: auto;
    position: relative;
}

.dark .card-modal-content {
    background: rgb(38, 38, 38);
}

.card-modal-overlay.active .card-modal-content {
    transform: scale(1);
}

.card-modal-media {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    background: rgb(229, 229, 229);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgb(229, 229, 229);
    margin-bottom: 1.5rem;
}

.dark .card-modal-media {
    background: rgb(82, 82, 82);
    border-color: rgb(82, 82, 82);
}

.card-modal-media video,
.card-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-modal-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: rgb(38, 38, 38);
}

.dark .card-modal-title {
    color: rgb(245, 245, 245);
}

.card-modal-description {
    font-size: 1rem;
    color: rgb(115, 115, 115);
    line-height: 1.6;
}

.dark .card-modal-description {
    color: rgb(212, 212, 212);
}

.card-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgb(239, 239, 239);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    padding: 0;
}

.dark .card-modal-close {
    background: rgb(64, 64, 64);
}

.card-modal-close:hover {
    background: rgb(220, 220, 220);
    transform: scale(1.1);
}

.dark .card-modal-close:hover {
    background: rgb(82, 82, 82);
}

.card-modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: rgb(64, 64, 64);
}

.dark .card-modal-close svg {
    fill: rgb(212, 212, 212);
}

@media (max-width: 640px) {
    .card-modal-content {
        padding: 1.5rem;
        width: 95vw;
    }

    .card-modal-title {
        font-size: 1.5rem;
    }

    .card-modal-description {
        font-size: 0.9rem;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Section header badge */
.card-modal-section {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.card-modal-section.extension {
    background: rgb(233, 213, 255);
    color: rgb(107, 33, 168);
}

.dark .card-modal-section.extension {
    background: rgba(147, 51, 234, 0.3);
    color: rgb(216, 180, 254);
}

.card-modal-section.website {
    background: rgb(209, 250, 229);
    color: rgb(6, 95, 70);
}

.dark .card-modal-section.website {
    background: rgba(16, 185, 129, 0.3);
    color: rgb(167, 243, 208);
}

.card-modal-section.edit {
    background: rgb(191, 219, 254);
    color: rgb(30, 64, 175);
}

.dark .card-modal-section.edit {
    background: rgba(59, 130, 246, 0.3);
    color: rgb(191, 219, 254);
}

.card-modal-section.settings {
    background: rgb(254, 243, 199);
    color: rgb(146, 64, 14);
}

.dark .card-modal-section.settings {
    background: rgba(245, 158, 11, 0.3);
    color: rgb(253, 230, 138);
}

/* Navigation buttons container */
.card-modal-nav-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.card-modal-nav {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgb(243, 244, 246);
    border: 1px solid rgb(209, 213, 219);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark .card-modal-nav {
    background: rgb(55, 55, 55);
    border-color: rgb(82, 82, 82);
}

.card-modal-nav:hover:not(:disabled) {
    background: rgb(229, 231, 235);
    transform: scale(1.1);
}

.dark .card-modal-nav:hover:not(:disabled) {
    background: rgb(75, 75, 75);
}

.card-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.card-modal-nav svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: rgb(64, 64, 64);
}

.dark .card-modal-nav svg {
    fill: rgb(212, 212, 212);
}