* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn','Segoe UI', Tahoma, Verdana, sans-serif;
}

body {
    background-color: whitesmoke;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #3e6c8c 0%, #b75b47 100%);
    border-radius: 10px;
    color: white;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.image-card {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    padding: 12px 15px;
    text-align: center;
    font-style: italic;
    color: #2d3748;
    background: white;
    border-top: 1px solid #eee;
}

.terms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.term-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-right: 3px solid #76b5c5;
    display: flex;
    flex-direction: column;
    height: auto;
}

.term-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.term-card h3 {
    color: #1a365d;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #76b5c5;
    padding-bottom: 6px;
}

.term-card h3 i {
    margin-left: 8px;
    color: #76b5c5;
    font-size: 1.1rem;
}

.term-card p {
    color: #2d3748;
    line-height: 1.5;
    font-size: 0.9rem;
}

.search-box {
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #e6b325;
    box-shadow: 0 0 0 2px rgba(230, 179, 37, 0.2);
}

/* Tablet: 768px */
@media (max-width: 768px) {
    .terms-container {
        grid-template-columns: 1fr; /* one card per row */
        gap: 15px;
    }

    .header h1 {
        font-size: 1.8rem; /* smaller but still prominent */
    }

    .header p {
        font-size: 1rem; /* slightly smaller paragraph */
    }

    .image-container {
        gap: 15px;
    }

    .image-card {
        min-width: 250px;
    }

    .image-caption {
        font-size: 0.95rem;
        padding: 10px 12px;
    }

    .term-card h3 {
        font-size: 1rem;
    }

    .term-card h3 i {
        font-size: 1rem;
    }

    .term-card p {
        font-size: 0.88rem;
    }

    .search-box input {
        max-width: 350px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Mobile: 576px */
@media (max-width: 576px) {
    .header h1 {
        font-size: 1.4rem; /* more compact for small screens */
    }

    .header p {
        font-size: 0.8rem;
    }

    .image-container {
        gap: 10px;
    }

    .image-card {
        min-width: 100%; /* full width on mobile */
    }

    .image-caption {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    .terms-container {
        grid-template-columns: 1fr; /* single column */
        gap: 10px;
    }

    .term-card h3 {
        font-size: 0.9rem;
    }

    .term-card h3 i {
        font-size: 0.9rem;
    }

    .term-card p {
        font-size: 0.8rem;
    }

    .search-box input {
        width: 100%;
        max-width: 100%;
        padding: 7px 10px;
        font-size: 0.85rem;
    }
}

.hero-section.terms {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/hero-terms-bg.jpg');
}