/* ============================================
   HOME PAGE – Personal Software Studio
   Palette: warm, earthy, green accent
   Font: IBM Plex Sans Arabic
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

.home-page {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    background: #F7F6F2;
    color: #202124;
}

/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 2rem 0 1.5rem;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    color: #202124;
    margin-bottom: 0.5rem;
}

.hero-content .highlight {
    color: #315C52;
}

.hero-sub {
    font-size: 1.05rem;
    color: #5F6368;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 480px;
}

.hero-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.hero-tags span {
    font-size: 0.75rem;
    color: #5F6368;
    background: #E8E4DA;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Software Console Signature ---------- */
.console-box {
    background: #202124;
    color: #E8E4DA;
    padding: 1.5rem 1.8rem;
    border-radius: 10px;
    font-family: 'IBM Plex Sans Arabic', monospace;
    max-width: 300px;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.console-box .title {
    font-size: 0.75rem;
    color: #D8D5CC;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.console-box .status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #B8C4B0;
}

.console-box .status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #315C52;
    display: inline-block;
}

.console-box .line {
    border-top: 1px solid #3A3C40;
    margin: 0.6rem 0;
}

.console-box .info {
    font-size: 0.8rem;
    color: #A0A2A6;
    line-height: 1.6;
}

.console-box .action {
    margin-top: 0.8rem;
    display: inline-block;
    background: #315C52;
    color: #F7F6F2;
    padding: 0.25rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 600;
}

.console-box .action:hover {
    background: #3A6E62;
}

/* ---------- Products Section ---------- */
.home-section {
    margin: 4rem 0 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.section-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #5F6368;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin: 0.1rem 0 0;
}

.section-desc {
    color: #5F6368;
    max-width: 600px;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

.see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #315C52;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 2px solid #D8D5CC;
    transition: border-color 0.2s;
}

.see-all:hover {
    border-color: #315C52;
}

/* ---------- Products Grid ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: #FBF9F6;
    border: 1px solid #E8E4DA;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.product-image {
    height: 150px;
    background: #E8E4DA;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #5F6368;
    margin-bottom: 0.3rem;
}

.free-badge, .price-badge {
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}
.free-badge {
    background: #D8D5CC;
    color: #202124;
}
.price-badge {
    background: #315C52;
    color: #F7F6F2;
}

.product-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #202124;
    margin: 0 0 0.3rem;
}

.product-card h3 a {
    color: inherit;
    text-decoration: none;
}
.product-card h3 a:hover {
    color: #315C52;
}

.product-description {
    font-size: 0.85rem;
    color: #5F6368;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 0.8rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

/* ---------- Articles ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.article-card .card-body {
    padding: 1rem 1.2rem;
}

.category-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    color: #5F6368;
    background: #E8E4DA;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.article-card h3 a {
    color: #202124;
    text-decoration: none;
}
.article-card h3 a:hover {
    color: #315C52;
}

.article-card .meta {
    font-size: 0.7rem;
    color: #A0A2A6;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.article-card .excerpt {
    font-size: 0.85rem;
    color: #5F6368;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #315C52;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 2px solid #D8D5CC;
    transition: border-color 0.2s;
}

.read-more:hover {
    border-color: #315C52;
}

/* ---------- License Verify Snippet ---------- */
.license-verify {
    background: #E8E4DA;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.license-verify p {
    margin: 0;
    color: #202124;
    font-weight: 500;
}

.license-verify p small {
    display: block;
    font-weight: 400;
    color: #5F6368;
    font-size: 0.85rem;
}

.license-verify .verify-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.license-verify input {
    padding: 0.5rem 0.8rem;
    border: 1px solid #D8D5CC;
    border-radius: 6px;
    background: #F7F6F2;
    font-family: inherit;
    font-size: 0.85rem;
    min-width: 180px;
}

.license-verify .btn {
    background: #315C52;
    color: #F7F6F2;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.license-verify .btn:hover {
    background: #3A6E62;
}

/* ---------- About ---------- */
.home-about {
    margin: 4rem 0 2rem;
}

.about-card {
    padding: 2rem 2rem 1.8rem;
    background: #FBF9F6;
    border: 1px solid #E8E4DA;
    border-radius: 12px;
    text-align: center;
}

.about-content {
    max-width: 650px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #202124;
    margin: 0.5rem 0 0.6rem;
}

.about-content p {
    color: #5F6368;
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary {
    background: #315C52;
    color: #F7F6F2;
    border-color: #315C52;
}

.btn-primary:hover {
    background: #3A6E62;
    border-color: #3A6E62;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #202124;
    border-color: #D8D5CC;
}

.btn-secondary:hover {
    background: #E8E4DA;
    border-color: #C0BDB4;
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid #315C52;
    outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-sub {
        margin: 0 auto 1.5rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-tags {
        justify-content: center;
    }
    .console-box {
        margin: 0 auto;
        max-width: 280px;
    }
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .license-verify {
        flex-direction: column;
        text-align: center;
    }
    .license-verify .verify-form {
        width: 100%;
        justify-content: center;
    }
    .license-verify input {
        min-width: auto;
        flex: 1;
    }
}

@media (max-width: 520px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .about-card {
        padding: 1.5rem 1rem;
    }
    .product-actions {
        flex-direction: column;
    }
    .product-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .about-actions {
        flex-direction: column;
        align-items: center;
    }
    .about-actions .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #A0A2A6;
    background: #FBF9F6;
    border-radius: 10px;
    border: 1px dashed #D8D5CC;
}
.empty-state h3 {
    color: #202124;
    font-weight: 500;
}
.empty-state p {
    font-size: 0.9rem;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
.verify-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.verify-form input {
    flex: 1;
    min-width: 140px;
}

.verify-form .btn {
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .verify-form {
        flex-direction: column;
        align-items: stretch;
    }
    .verify-form input {
        min-width: auto;
    }
}

/* ============================================
   Notes List (ملاحظات)
   ============================================ */

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.note-item {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #E8E4DA;
}

.note-item:last-child {
    border-bottom: none;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
    color: #A0A2A6;
}

.note-category {
    background: #E8E4DA;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    color: #5F6368;
}

.note-date,
.note-reading {
    color: #A0A2A6;
}

.note-item h3 {
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.note-item h3 a {
    color: #202124;
    text-decoration: none;
}

.note-item h3 a:hover {
    color: #315C52;
}

.note-excerpt {
    margin: 0.2rem 0 0;
    color: #5F6368;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Mobile */
@media (max-width: 600px) {
    .note-meta {
        font-size: 0.65rem;
        gap: 0.3rem 0.5rem;
    }
    .note-item h3 {
        font-size: 1rem;
    }
    .note-excerpt {
        font-size: 0.85rem;
    }
}

/* ============================================
   Console Box – Center Text Fix
   ============================================ */
.console-box {
    text-align: center;
}

.console-box .title {
    text-align: center;
}

.console-box .status {
    justify-content: center;
}

.console-box .info {
    text-align: center;
}

.console-box .action {
    margin: 0.8rem auto 0;
    display: inline-block;
}
