/*
Theme Name: Cascade Green RTL
Author: Your Name
Version: 1.0
Text Domain: cascade-green-rtl
*/

@font-face {
  font-family: 'Vazir';
  src: url('assets/font/vazir/Vazir.woff2') format('woff2'),
       url('assets/font/vazir/Vazir.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #87CEEB;
  direction: rtl;
  color: #004d40;
}

/* ===== Header ===== */
.simple-header {
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 12px 30px;
  text-align: center;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-title {
  font-size: 28px;
  font-weight: bold;
  color: #004d40;
  margin: 0;
  font-family: 'Vazir', sans-serif;
}

/* نوار طیف رنگی زیر هدر */
.gradient-bar {
  height: 5px;
  background: linear-gradient(to right, #009688, #00bcd4, #03a9f4, #2196f3);
}


/* ===== Iframe Layout ===== */
.main-wrapper {
  display: flex;
  height: calc(100vh - 60px); /* اگر هدر بالا 60px ارتفاع دارد */
  overflow: hidden;
  flex-direction: row-reverse;
}

.sidebar {
  width: 30%;
  padding: 20px;
  background-color: #EEEDF1;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

iframe {
  width: 70%;
  height: 100%;   /* 100% ارتفاع والد */
  border: none;
  border-right: 2px dotted gray;

  background-image: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)), url("assets/img/backgiframe.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #fff;
}


.section {
  border: 1px solid #b2dfdb;
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  transition: 0.3s;
}

.section-header {
  background-color: #009688;
  color: white;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 17px;
  user-select: none;
  transition: background-color 0.3s;
}

.section-header:hover {
  background-color: #00796b;
}

.section-links {
  display: none;
  padding: 12px 20px;
  background-color: #e0f2f1;
}

.section-links a {
  display: flex;
  align-items: center;
  margin: 10px 0;
  color: #004d40;
  background-color: #b2dfdb;
  padding: 10px 15px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.section-links a:hover {
  background-color: #80cbc4;
  transform: translateX(-5px);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.popup-content {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.popup-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.close-popup {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #f44336;
  color: #fff;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  text-align: center;
  font-size: 22px;
  cursor: pointer;
}

.popup-thumbnail {
  width: 50px;
  height: auto;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s;
}

.popup-thumbnail:hover {
  opacity: 0.8;
}

.notice-section {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 6px;
  margin-top: 20px;
}

.notice-section .section-header {
  background-color: #ffeeba;
  color: #856404;
  padding: 10px;
  font-weight: bold;
  text-align: center;
  border-bottom: 1px solid #ffd966;
}


/* ===== Footer ===== */
.custom-footer {
  background-color: #1c1c1c;
  color: #fff;
  font-family: 'Vazir', sans-serif;
  padding: 40px 20px 20px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.footer-column {
  flex: 1 1 250px;
  min-width: 220px;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 15px;
}

.footer-tagline {
  font-size: 14px;
  margin-top: 0;
  color: #ccc;
}

.footer-contact h4,
.footer-social h4 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #00bfa5;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  margin-bottom: 10px;
  font-size: 15px;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.footer-contact i {
  margin-left: 8px;
  color: #00bfa5;
}

.social-links a {
  display: inline-block;
  margin-left: 12px;
  font-size: 20px;
  color: #ccc;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #00bfa5;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #aaa;
  border-top: 1px solid #333;
  padding-top: 15px;
}


/* ===== Spinner (optional) ===== */
.spinner {
  display: inline-block;
  margin-left: 8px;
  width: 16px;
  height: 16px;
  border: 3px solid #004d40;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  .header-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-title {
    margin-top: 10px;
    text-align: center;
  }

  .logo-title-group {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .site-info {
    text-align: center;
  }

  .sidebar {
    width: 100%;
    height: auto;
    box-shadow: none;
    padding: 10px;
  }

  iframe {
    width: 100%;
    height: 50vh;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-column {
    max-width: 100%;
  }

  .footer-contact li {
    justify-content: center;
  }

  .social-links a {
    margin-left: 8px;
  }
}
