/* ------------------------ */
/* CSS اصلی سایت - دسکتاپ */
/* ------------------------ */

body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: #94BDFF;
  color: #222;
}

/* فونت‌ها */
@font-face { font-family: 'B-Titr'; src: url('../../fonts/B-Titr.TTF'); }
@font-face { font-family: 'B-Nazanin'; src: url('../../fonts/B-Nazanin.TTF'); }
@font-face { font-family: 'B-Nazanin-Bold'; src: url('../../fonts/B-Nazanin-Bold.TTF'); }
@font-face { font-family: 'Vazirmatn'; src: url('../../fonts/Vazirmatn.woff'); }

/* ---------------- Header ---------------- */
header {
  background: linear-gradient(135deg, #3975C4, #6CA0DC);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
header .right, header .center, header .left { flex: 1; }
header .right { text-align: right; font-weight:bold; font-family:'B-Titr'; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
header .center {
  text-align:center;
  font-size:32px;
  font-weight:bold;
  font-family:'B-Titr';
  color:#FFD700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
header .left {
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-end;
  font-family:'B-Titr';
  color:#fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
header img {
  width: 32px;
  height: 75px;
  transition: transform 0.3s ease;
}
header img:hover { transform: rotate(10deg) scale(1.05); }

/* ---------------- Menu ---------------- */
#side-menu {
  padding-top: 90px;
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: #fff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.15);
  transition: 0.3s;
  font-family: 'B-Nazanin', Tahoma, sans-serif;
  z-index: 1000;
  overflow-y: auto;
}
#side-menu.open { right: 0; }
#side-menu a {
  display: block;
  padding: 12px 15px;
  margin: 5px 0;
  text-decoration: none;
  color: #3975C4;
  border-radius: 8px;
  transition: 0.2s; 
  font-family:'B-Titr';
}
#side-menu a:hover { background: #f0f4ff; }
#side-menu .username {
  font-weight: bold;
  color: #222;
  margin-bottom: 15px;
  text-align: center;
  background: #f0f4ff;
  padding: 10px;
  border-radius: 8px;
}
#menu-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1100;
  font-size: 22px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #3975C4;
  color: #fff;
  cursor: pointer;
  font-family:'B-Titr';
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#menu-btn:hover { background: #2851a3; }

/* ---------------- Main Desktop ---------------- */
main {
  display: flex;
  min-height: calc(100vh - 70px);
  padding: 40px;
  box-sizing: border-box;
  gap: 0px;
}

.text-section, .text-section2 {
  flex: 2;
  padding: 10px;
  font-size: 18px;
  line-height: 1.9;
}
.text-section { font-family:'B-Titr'; }
.text-section2 { font-family:'B-Nazanin-Bold'; }

.image-section {
  flex: 1;
  display: flex;
  padding: 20px;
  justify-content: center;
  align-items: center;
}
.image-section img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.image-section2 {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.image-section2 img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ---------------- Responsive Mobile ---------------- */
@media (max-width: 768px) {

    body { font-size: 16px; line-height: 1.6; }
    .container { margin: 0; padding: 10px; box-sizing: border-box; }

    /* Header */
    header .right, header .center, header .left { font-size: 12px; }
    header .center { font-size: 20px; white-space: nowrap; overflow: visible; text-overflow: ellipsis; }
    header img { width: 28px; height: 40px; }
    header .left span { display: none; }
    #menu-btn { font-size: 20px; padding: 8px 10px; }

    /* Main layout: متن بالا، عکس‌ها در یک ردیف */
 @media (max-width: 768px) {
    main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 5px;
        gap: 2px; /* فاصله بین متن‌ها و ردیف عکس‌ها */
    }

    .text-section, .text-section2 {
        width: 100%;
        padding: 2px;
        margin: 0;
        text-align: right;
        line-height: 1.5;
    }

    .image-row {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        gap: 2px;
        margin: 0;
        padding: 0;
    }

    .image-section, .image-section2 {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    .image-section img {
        width: 100%;
        max-width: 70%;
        height: auto;
        object-fit: contain;
        border-radius: 12px;
    }


.image-section2 img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 12px;
    }
}


    .image-section img:hover,
    .image-section2 img:hover {
        transform: scale(1.03);
    }
header img { width: 20px; height: 37px; }

    /* کارت‌ها و فایل‌ها */
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .card { padding: 15px; font-size: 0.9rem; border-radius: 12px; }
    .file { font-size: 0.85rem; padding: 10px; }
    .search { font-size: 0.9rem; padding: 10px; }
    h2, h3, h4 { font-size: 1.1rem; }
}
