/* force direction text*/
/* فقط متن‌های پاراگرافی و طولانی */
body.fa p,
body.fa .error-text,
body.fa .card p {
    direction: rtl !important;
}

body.en p,
body.en .error-text,
body.en .card p,
body.tr p,
body.tr .error-text,
body.tr .card p {
    direction: ltr !important;
}




:root {
  --primary-bg: #0a2140;      /* darkest background layer */
  --accent:     #f4c431;      /* warm yellow used for headings and buttons */
  --text-light: #ffffff;      /* light text */
  --text-dark:  #0a2140;      /* dark text (for use on yellow backgrounds) */
}
@font-face {
  font-family: 'Pinar';
  src: url('../fonts/Pinar-Regular.woff2') format('woff2'),
       url('../fonts/Pinar-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* ensures text is shown while font loads */
}

@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir.woff2') format('woff2'),
       url('../fonts/Vazir.woff') format('woff'),
       url('../fonts/Vazir.ttf') format('truetype'),
       url('../fonts/Vazir.eot') format('eot');

  font-weight: normal;
  font-style: normal;
  font-display: swap; /* ensures text is shown while font loads */
}

@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir-Bold.woff2') format('woff2'),
       url('../fonts/Vazir-Bold.woff') format('woff'),
       url('../fonts/Vazir-Bold.ttf') format('truetype'),
       url('../fonts/Vazir-Bold.eot') format('eot');

  font-weight: bold;
  font-style: normal;
  font-display: swap; /* ensures text is shown while font loads */
}


/* Generic resets */
* {
  box-sizing: border-box;
}



html, body {
  height: 100%;
  margin: 0;
}

* {
    font-family: Vazir, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh; 
  background: url("../images/img1.png") no-repeat center center fixed;
  background-size: cover;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.9);
  backdrop-filter: brightness(1.4);  /* no blur */
  -webkit-backdrop-filter: brightness(1.4);
  z-index: -1;
}

/*body::before {*/
/*  content: "";*/
/*  position: fixed;*/
/*  top: 0;*/
/*  left: 0;*/
/*  width: 100%;*/
/*  height: 100%;*/
/*  !* black overlay at 60% opacity *!*/
/*  background-color: rgba(0, 0, 0, 0.6);*/
/*  z-index: -1; !* keep it under content *!*/
/*}*/

.main-container {
  width: 100%;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}



/* Container used on most pages to centre content */
.container {
  width: 90%;
  margin: 2rem auto;
}

html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

.card-wrapper {
  margin: auto;         
  display: flex;        
  justify-content: center; 
  align-items: center;     
  flex-direction: column;
  flex-grow: 1;
  margin: 0px;
}


/* Glassmorphism Card */
.card,
.popup {
  background: rgba(255, 255, 255, 0.005);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  min-height: 600px;

}

.card {
  background: rgba(255, 255, 255, 0.005);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);

  /* Make height fit content */
  min-height: auto;       /* remove fixed min-height */
  max-width: 600px;       
  width: 100%;
  margin: 2rem auto;      
}

/* Optional: center content vertically if you want it in the middle of the viewport */
body[data-page="home"] .container,
body[data-page="register"] .container {
  display: flex;
  justify-content: center;   
  align-items: center;       
  min-height: 100vh;         
  padding: 1rem;             
  flex-direction: column;
}
.container, .card {
  position: relative;
  z-index: 1;
}

/* Default headings (desktop) */
h1, h2, h3 {
  margin-top: 0;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  font-size: 32px; 
}

/* On mobile screens (max 768px wide) */
@media (max-width: 768px) {
  h1, h2, h3 {
    font-size: 16px; 
  }
}

/* Paragraphs */
p {
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
}

/* Inputs */
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="email"] 
 {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-light);
  text-align: right;
}

/* Buttons */
button,
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--text-dark);
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background-color: #e0b022;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Links */
a.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

a.link:hover {
  text-decoration: underline;
}



.remaining-count {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  color: #b3c5e3;
}

/* Popup overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup h3 {
  margin-top: 0;
  color: var(--accent);
}

.popup p {
  margin: 1rem 0 1.5rem;
  color: var(--text-light);
}

.popup .btn-container {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.popup .btn-container a {
  flex: 1;
}

/* Slots list */
.slot-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.slot-item {
  background: rgba(31, 63, 112, 0.4);
  color: var(--text-light);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slot-item:hover {
  background: rgba(14, 42, 85, 0.4);
}

/* Confirmation */
.confirmation {
  text-align: center;
}

.confirmation .details {
  margin: 1rem 0;
  font-size: 1.1rem;
  color: #b3c5e3;
}
input::placeholder {
  color: #b3c5e3;   
  opacity: 1;       
}

/* === Background slideshow container and slides === */
.bg-slideshow {
  position: fixed;          
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;              
  overflow: hidden;
}

/* each slide is a full-screen background image */
.bg-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* individual slide images */
.bg-slideshow .slide1 { background-image: url("../images/img1.png"); }
.bg-slideshow .slide2 { background-image: url("../images/img2.png"); }
.bg-slideshow .slide3 { background-image: url("../images/img3.png"); }
.bg-slideshow .slide.active { opacity: 1; }

/* === Dark overlay stays on top of slideshow but under content === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 0;   /* above slideshow (-1) but below .container (1) */
}

/* keep container & cards above overlay */
.container, .card {
  position: relative;
  z-index: 1;
}

/* Logo at top-right corner */
/*.logo {*/
/*  position: fixed;      !* stay in place even when scrolling *!*/
/*  top: 1rem;            !* distance from top *!*/
/*  right: 1rem;          !* distance from right *!*/
/*  width: 80px;          !* adjust as needed *!*/
/*  height: auto;         !* maintain aspect ratio *!*/
/*  z-index: 10;          !* above everything else *!*/
/*}*/

.footer {
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5); /* dark glass background */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  z-index: 5;
  display: flex;
  justify-content: center;   
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-light);
  font-size: 0.9rem;

}

.footer-content {
  display: flex;
  justify-content: center;   
  align-items: center;
  /* text-align: center;         */
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.footer-content p {
  margin: 0; /* remove default p margin */
  font-size: 0.7rem;
}



.language-flags {
  display: flex;
  gap: 0.5rem;
}

.language-flags .flag {
  width: 24px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.language-flags .flag:hover {
  transform: scale(1.1);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;      /* vertical center */
  justify-content: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  

}

body {
  padding-top: 70px;
}

.header-content {
  display: flex;
  align-items: center;  
  justify-content: space-between;
  width: 90%;
}

/* keep your original logo size */
.header .logo {
  height: 60px;    /* bigger logo */
  width: auto;
  display: block;
  object-fit: contain;
}

/* keep your original flag size but align vertically */
.language-flags {
  display: flex;
  align-items: center; /* vertical align of flags themselves */
  gap: 5px;
}

.language-flags .flag {
  width: 24px;   /* small flags */
  height: auto;
  cursor: pointer;
}

.site-title {
  font-size: 1.9rem;
  color: #fff;
  margin: 0;
}

.card .btn {
  display: block;          
  width: fit-content;      
  margin: 1rem auto 0;     
  text-align: center;      
}

html.ltr, body.ltr {
  direction: ltr !important;
  text-align: left !important;
}

html.rtl, body.rtl {
  direction: rtl !important;
  text-align: right !important;
}

