/* Home-only refinements aligned with the existing site language */

.domains-section {
    padding: 6.25rem 2rem;
    background-color: #2c3a4d;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 72%);
}

body.light-mode .domains-section {
    background-color: #f0f4f8;
    background-image: linear-gradient(180deg, rgba(0, 123, 255, 0.04), rgba(255, 255, 255, 0) 70%);
}

.domains-section .section-intro {
    max-width: 40rem;
    margin: 0 auto 3.5rem;
}

.domains-grid {
    gap: 2rem;
    max-width: 1160px;
}

.domain-card {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--header-border-color);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.domain-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
    border-color: rgba(0, 123, 255, 0.32);
}

.domain-card-media {
    padding: 0.85rem 0.85rem 0;
}

.domain-card-media::after {
    content: none;
}

.domain-card img {
    height: 300px;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
}

.domain-card-title-area {
    padding: 1.1rem 1.2rem 1.3rem;
    min-height: 72px;
}

.domain-card h3 {
    font-size: 1.22rem;
    font-weight: 600;
    color: var(--text-primary);
}

body.light-mode .domain-card {
    background: #ffffff;
    border-color: #dde4ec;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.modal-overlay {
    background-color: rgba(8, 14, 24, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    width: min(980px, 92vw);
    max-height: 88vh;
    border-radius: 20px;
    background: var(--section-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
    align-items: stretch;
}

.modal-media {
    padding: 1.25rem 0 1.25rem 1.25rem;
    background: transparent;
}

.modal-media::after {
    content: none;
}

.modal-body img {
    width: 100%;
    min-height: 380px;
    height: 100%;
    max-height: none;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: none;
}

.modal-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.85rem 2rem 1.85rem 1.5rem;
}

.modal-text h2 {
    font-size: 2rem;
    margin: 0 0 0.9rem;
    line-height: 1.15;
}

.modal-text h4 {
    margin: 1.15rem 0 0.45rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

.modal-text p {
    font-size: 0.98rem;
    line-height: 1.75;
}

.modal-close {
    top: 0.9rem;
    right: 0.9rem;
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 37, 51, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-close:hover {
    background: rgba(0, 123, 255, 0.9);
}

body.light-mode .modal-content {
    background: #ffffff;
    border-color: #dbe2ea;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
}

body.light-mode .modal-close {
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-primary);
    border-color: #dbe2ea;
}

@media (max-width: 992px) {
    .domains-section {
        padding: 5rem 1.5rem;
    }

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

    .domain-card img {
        height: 270px;
    }

    .modal-content {
        width: min(680px, calc(100vw - 1.5rem));
        max-height: 90vh;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-media {
        padding: 1rem 1rem 0;
    }

    .modal-body img {
        min-height: 0;
        height: 260px;
    }

    .modal-text {
        padding: 1.4rem 1.4rem 1.6rem;
    }
}

@media (max-width: 640px) {
    .domains-section {
        padding: 4.5rem 1rem;
    }

    .domain-card {
        border-radius: 16px;
    }

    .domain-card-media {
        padding: 0.75rem 0.75rem 0;
    }

    .domain-card img {
        height: 220px;
        border-radius: 10px;
    }

    .domain-card-title-area {
        padding: 1rem 1rem 1.15rem;
        min-height: 64px;
    }

    .modal-content {
        width: calc(100vw - 1rem);
        border-radius: 18px;
    }

    .modal-body img {
        height: 220px;
        border-radius: 12px;
    }

    .modal-text {
        padding: 1.2rem 1.1rem 1.35rem;
    }

    .modal-text h2 {
        font-size: 1.7rem;
    }
}
