/* ============================================================
   CD Catalog - Hebrew RTL Stylesheet
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Heebo', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f4f6f9;
    color: #2c3e50;
    line-height: 1.6;
}

a {
    color: #2980b9;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: #1a5276;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 50px 20px 40px;
    text-align: center;
    border-bottom: 4px solid #e94560;
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
}

.site-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.site-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #a8c0d6;
    margin-bottom: 20px;
}

.site-description {
    background: rgba(255,255,255,0.08);
    border-right: 4px solid #e94560;
    border-radius: 4px;
    padding: 16px 20px;
    margin-top: 20px;
    text-align: right;
}

.site-description p {
    font-size: 1rem;
    color: #cdd6e0;
    line-height: 1.8;
}

/* ============================================================
   SEARCH SECTION
   ============================================================ */
.search-section {
    background: #ffffff;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e0e0e0;
}

.search-form {
    max-width: 1100px;
    margin: 0 auto;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .search-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 550px) {
    .search-grid {
        grid-template-columns: 1fr;
    }
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field input,
.search-field select {
    padding: 10px 14px;
    border: 2px solid #7f8c8d !important;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Heebo', Arial, sans-serif;
    direction: rtl;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
    background: #fff;
}

/* Global stronger input borders for all pages */
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=file],
select,
textarea {
    border: 2px solid #b0bec5 !important;
    border-radius: 8px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #0f3460 !important;
    box-shadow: 0 0 0 3px rgba(15,52,96,0.15) !important;
    background: #fff !important;
}

.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.btn {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Heebo', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-search {
    background: #0f3460;
    color: white;
}
.btn-search:hover {
    background: #1a5276;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15,52,96,0.3);
    text-decoration: none;
    color: white;
}

.btn-reset {
    background: #e8edf2;
    color: #555;
}
.btn-reset:hover {
    background: #d6dee6;
    text-decoration: none;
    color: #333;
}

/* ============================================================
   RESULTS INFO
   ============================================================ */
.results-info {
    padding: 16px 20px;
    background: #f4f6f9;
}

.results-info p {
    font-size: 0.95rem;
    color: #666;
}

.no-results {
    color: #c0392b;
    font-weight: 600;
}

/* ============================================================
   CD GRID
   ============================================================ */
main.container {
    padding-top: 24px;
    padding-bottom: 40px;
}

.cd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .cd-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ============================================================
   CD CARD
   ============================================================ */
.cd-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.cd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cd-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e8ecf0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.cd-card:hover .cd-image-wrap img {
    transform: scale(1.05);
}

.no-image {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
}

.cd-info {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cd-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-info p {
    font-size: 0.88rem;
    color: #333;
    line-height: 1.5;
}

.cd-info .label {
    font-weight: 700;
    color: #1a1a2e;
    margin-left: 4px;
}

.cd-artist {
    color: #1a1a2e !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}

.cd-genre a,
.cd-lang a {
    color: #2980b9;
    font-size: 0.88rem;
}

.cd-genre a:hover,
.cd-lang a:hover {
    text-decoration: underline;
}

.cd-group {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.88rem !important;
    color: #1a1a2e !important;
    font-weight: 700 !important;
    border-top: 1px solid #f0f0f0;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    padding-bottom: 20px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: 6px;
    background: white;
    color: #2980b9;
    border: 1.5px solid #dde0e7;
    font-size: 0.9rem;
    font-family: 'Heebo', Arial, sans-serif;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.page-btn:hover {
    background: #0f3460;
    color: white;
    border-color: #0f3460;
    text-decoration: none;
}

.page-btn.active {
    background: #0f3460;
    color: white;
    border-color: #0f3460;
    cursor: default;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #1a1a2e;
    color: #8899aa;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    margin-top: 20px;
}
