/* ===================================================
   dndnha.io - Modern Clean Theme (v2)
   =================================================== */

/* --- Variables --- */
:root {
  --navy:       #2c4a7c;
  --navy-dk:    #1e3560;
  --navy-lt:    #3d5a8a;
  --primary:    #2980b9;
  --primary-lt: #eaf4fb;
  --accent:     #1abc9c;
  --bg:         #f2f4f8;
  --surface:    #ffffff;
  --border:     #dde3ed;
  --text:       #2c3e50;
  --text-muted: #7f8c9a;
  --radius:     10px;
  --radius-lg:  50px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --transition: .18s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin-top: 0 !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  direction: rtl;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

img { max-width: 100%; height: auto; }

/* --- Navbar --- */
.dnd-navbar {
  background: var(--navy);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
  direction: rtl;
}

.dnd-navbar .navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1400px;
  margin: 0 auto;
}

.dnd-navbar .nav-brand img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.dnd-navbar .nav-links {
  display: flex;
  flex-direction: row;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dnd-navbar .nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 6px;
  color: rgba(255,255,255,.88);
  font-weight: 500;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

.dnd-navbar .nav-links a:hover,
.dnd-navbar .nav-links a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.dnd-navbar .nav-links i { font-size: 14px; }

.dnd-navbar .nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

/* --- Search Hero --- */
.search-hero {
  background: var(--bg);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.search-hero.hero-home {
  padding: 3rem 1rem 2.5rem;
  min-height: 240px;
}

.search-hero .hero-logo {
  max-height: 90px;
  width: auto;
  margin-bottom: 1.75rem;
  display: block;
}

.search-form-wrap {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  padding: 4px 4px 4px 8px;
}

.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(41,128,185,.18);
}

.search-form .search-icon {
  color: var(--text-muted);
  padding: 0 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  direction: rtl;
  min-height: 44px;
}

.search-form input::placeholder { color: var(--text-muted); }

.search-form button {
  background: var(--navy);
  border: none;
  color: #fff;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.search-form button:hover { background: var(--navy-lt); }

/* --- Search Tags --- */
.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 1.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.search-tags a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  transition: all var(--transition);
  white-space: nowrap;
}

.search-tags a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
}

/* --- Main Container --- */
.dnd-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* --- Song List Cards --- */
.song-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 12px;
}

.song-list:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.song-list1 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  padding: 12px 14px;
}

/* --- Download / Play Buttons --- */
.mp3-dl a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
}

.mp3-dl a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
}

.mp3-dl a.play_now,
.mp3-dl a[onclick] {
  border-color: var(--accent);
  color: var(--accent);
}

.mp3-dl a.play_now:hover,
.mp3-dl a[onclick]:hover {
  background: var(--accent);
  color: #fff;
}

#download_link a,
#download_link1 a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
  border: 2px solid var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
  margin: 4px 2px;
}

#download_link a:hover {
  background: var(--primary);
  color: #fff;
}

#download_link1 a {
  border-color: var(--accent);
  color: var(--accent);
  background: #e0f7ff;
}

#download_link1 a:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Alerts / Info Boxes --- */
.alert-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  text-shadow: none;
}

.alert-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  color: #5a4000;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

/* --- Well (search box wrapper) --- */
.well {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

/* --- Thumbnails / Images --- */
.thumbnail,
.img-rounded {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.square-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
  border-radius: var(--radius);
}

.square-box::before { content: ""; display: block; padding-top: 100%; }

.square-content {
  border: none;
  border-radius: var(--radius);
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}

/* --- Player --- */
#preview {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  border-radius: var(--radius);
  padding: 12px;
  margin: 8px 0;
}

/* --- Sections / Categories --- */
.dnd-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}

.dnd-categories a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
}

.dnd-categories a:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: var(--primary);
  color: #fff;
}

/* --- Footer --- */
.dnd-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 2rem;
}

.dnd-footer a { color: var(--text); font-weight: 500; }
.dnd-footer a:hover { color: var(--primary); text-decoration: underline; }

.dnd-footer .footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-dot {
  color: var(--text-muted);
  font-size: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Lists --- */
ul#items { list-style: none; padding: 0; margin: 0; }
ul#items li { margin-bottom: 4px; }

/* --- Headings --- */
h1 { font-size: 1.6rem; font-weight: 700; color: var(--text); }
h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }

/* --- Pagination --- */
ol#pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  justify-content: center;
}

ol#pagination li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
  float: none;
}

ol#pagination li:hover,
ol#pagination li.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Dropdown Language --- */
.dropdown-menu {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.dropdown-menu li a {
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-menu li a:hover { background: var(--bg); color: var(--primary); }

/* --- Mobile Navbar Menu --- */
@media (max-width: 768px) {
  .dnd-navbar .nav-toggle { display: block; }

  .dnd-navbar .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-end;
    padding: 0.75rem;
    gap: 4px;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }

  .dnd-navbar .nav-links.open { display: flex; }

  .search-form input { font-size: 15px; }
  .search-form button { padding: 0 1.25rem; font-size: 14px; }

  .dnd-container { padding: 1rem 0.75rem; }
}

/* --- Bootstrap overrides --- */
.container { max-width: 1200px; }
.navbar-fixed-top { position: static !important; }
.navbar { margin-bottom: 0 !important; border: none !important; border-radius: 0 !important; }
.navbar-default { background: transparent; border: none; box-shadow: none; }
.navbar-default .navbar-nav > li > a { color: var(--text); }
.navbar-default .navbar-nav > li > a:hover { color: var(--primary); background: transparent; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border-color: var(--primary) !important;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.88; }
.form-control {
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-family: inherit;
  color: var(--text);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,111,164,.14);
}

/* --- Layout Cleanup --- */
.col-md-9 { width: 100% !important; float: none !important; }
.col-md-3 { display: none; }
.row.clearfix { margin: 0; padding: 0; }
#section1 { padding: 0; margin: 0; }
.container-fluid { padding: 0 !important; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.song-list, .alert-info {
  animation: fadeInUp .3s ease both;
}
