/* Global Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
      
    --primary-accent-color: #ff3760; /* Main pink/red for buttons, highlights */
    --primary-accent-hover: #ff379e;
    --primary-accent-active-record: #ff2d55;

    --body-bg-color: #FAF7F0; /* Overall page background */
    --chat-bg-color: transparent; /* Chat area background, video might be underneath */
    --chat-container-bg: #2f2e2e; /* Chat input container background */

    --text-color-light: #e9e5e5; /* For dark backgrounds, like bot name */
    --text-color-dark: #333;
    --text-color-medium: #555;
    --text-color-soft: #777;
    --text-color-placeholder: #888; /* For input placeholder */

    --input-bg-color: #f0f0f0;
    --input-border-color: #e0e0e0;
    --input-focus-border-color: var(--primary-accent-color);
    --input-focus-bg-color: white;

    --message-sent-bg: #ebe4e4;
    --message-sent-text: #0040b5;
    --message-received-bg: #474646;
    --message-received-text: #ffffff;

    --bot-avatar-border: white;
    --button-secondary-bg: #f0f0f0; /* e.g., plus button */
    --button-secondary-hover-bg: #e0e0e0;

    --icard-tag: #181213;


    --slider-bg: #ccc;
    --slider-bg-checked: #4CAF50; /* Green for toggles */
    --slider-thumb-bg: white;

    --font-family-base: 'Beiruti', 'Cairo', 'montserrat', sans-serif;
    --font-size-base: 18px;
    --font-size-input: 16px;
    --font-size-message-sent: 20px;
    --font-size-message-received: 21px;
    --font-size-small: 0.9em;
    --font-size-timestamp: 0.75em;

    --border-radius-standard: 10px;
    --border-radius-rounded: 24px; /* For input fields, sliders */
    --border-radius-circle: 50%;

    --box-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.1);
    --box-shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.1);

    --chat-height-offset: 80px; /* Space for input bar */
    --input-bar-height: 80px;
}

/* CSS Custom Properties (Variables) 
:root {
  --primary-color: #ff3760;
  --secondary-color: #5237ff;
  --text-color-light: wheat;
  --text-color-dark: black;
  --background-color-main: #929292;
  --background-color-light: #FAF7F0;
  --background-color-dark-accent: #3f3b3b;
  --background-color: #FAF7F0;
  --color-secondary: #D8D2C2;
  --color-primary: #B17457;
  --text-color-primary: #4A4947;
  --text-color-secondery: #fdfcfa;
  --button-color-primary: linear-gradient(to right, var(--color-primary), var(--text-color-primary), var(--color-primary));  
  --box-shadow: rgba(0, 0, 0, 0.484);
  --font-family: "Beiruti", monospace;
  --button-radius: 10px;
  --menu-icon-size: 50px; 
}
*/

:root {
  --primary-color: #ff3760;
  --secondary-color: #5237ff;
  --text-color-light: wheat;
  --text-color-dark: black;
  --background-color-main: #929292;
  --background-color-light: #FAF7F0;
  --background-color-dark-accent: #3f3b3b;
  --background-color: #F7F7F7;
  --color-secondary: #bbdce5; /* FFB22C */
  --color-primary: #ff3760; /*  ff379e*/
  --text-color-primary: #4A4947;
  --text-color-secondery: #fdfcfa;
  --button-color-primary: linear-gradient(to right, var(--color-primary), var(--color-secondary), var(--color-primary));  
  --box-shadow: rgba(0, 0, 0, 0.484);
  --font-family: "Beiruti", monospace;
  --button-radius: 10px;
  --menu-icon-size: 50px; 
  }

/* Font Definition */
@font-face {
  font-family: 'Beiruti';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/beiruti/v4/JTUXjIU69Cmr9FGcSA1t4FZA.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
                 U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC,
                 U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03,
                 U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37,
                 U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52,
                 U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64,
                 U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89,
                 U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* Base Body Styles */
body {
  background-color: var(--background-color);
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text-color-primary); /* Default text color for body */
  text-align: justify;
  hyphens: auto;
  line-height: 1.7;
  word-break: break-word;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5px;
  border-bottom: 0.5px solid color-mix(in srgb, var(--color-secondary), transparent 50%);
  z-index: 999;

  /* Gradient background with transparency */
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--color-primary), transparent 80%) 0%,
    transparent 100%
  );

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* Safari */
}

.head-left {
  display: flex;
  align-items: center;
}

.head-left img {
  height: 75px;
}

header .header-title {
  color: var(--color-primary);
  margin-left: 10px;
}


header .upmenu {
  display: flex;
  justify-content: space-between;
  width: 50%;
  word-break: normal
}

header .upmenu li {
  list-style: none;
  margin: 0 10px;
}

header a {
  text-decoration: none;
  color: var(--text-color-primary);
  font-weight: 900;
  font-size: 15px;
}

header a:hover {
  color: var(--text-color-primary);
  text-shadow: 0 0 15px var(--color-secondary);
}

.head-right {
  display: flex;
  align-items: center;
}




.navq {
  position: relative;
  margin-right: 25px;
  border-radius: var(--button-radius);
  background-size: 200%;
  /*animation:  animationGradient 2.5s linear infinite;*/
  /*clip-path: polygon(0 0, 75% 0%, 100% 50%, 100% 100%, 0 98%, 0% 50%);*/
}

/*
.button-box {
  position: relative;
  width: 100px;
  height: 45px;
  margin-right: 25px;
  background: linear-gradient(to right, var(--color-secondary), var(--color-primary), var(--color-secondary));
  border-radius: var(--button-radius);
  background-size: 200%;
  animation:  animationGradient 2.5s linear infinite;
  /*clip-path: polygon(0 0, 75% 0%, 100% 50%, 100% 100%, 0 98%, 0% 50%);
}



.head-right .navq {
  display: none;
}
  

@keyframes animationGradient {
  to{
    background-position: 200% center;
  }
}


*/





.head-right button {
  inset: 3px 3px 3px 3px;
  border: none;
  background: var(--color-secondary);
  color: var(--text-color-primary);
  cursor: pointer;
  border-radius: var(--button-radius);
  /*clip-path: polygon(0 0, 75% 0%, 100% 50%, 100% 100%, 0 98%, 0% 50%);*/
  transition: 0.3s ease-in-out;
  font-size: large;
  font-weight: 700;
  
}

.head-right button:hover {
  color: var(--text-color-primary);
  background: var(--color-secondary);
  font-weight: 900;
  font-size: larger;
  box-shadow: 0 0 15px var(--color-primary);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  height: 100vh;
  overflow: hidden;
}
/*
.hero-blur-image {
  position: fixed;
  width: 100%;
  top: -15%;
  opacity: 0.7;
}*/

.hero-rings-image {
  position: fixed;
  height: 90%;
  top: 90px;
  opacity: 0.2;
}

.hero-icons-image {
  position: fixed;
  width: 100%;
  top: 50%;
}


.back-image {
  z-index: -5; /* Keep behind button */
  pointer-events: none; /* Prevent interaction */
  user-select: none; /* Prevent selection */
}

.hero-image-cont {
  position: fixed;
  /*width: 1000px;*/
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /*background: linear-gradient(to left, var(--color-primary), var(--color-secondary), var(--color-primary));*/
  background-size: 200%;
  animation: animationGradient 2.5s linear infinite;
  opacity: 1;
  z-index: -10;
}

.hero-image-cont img {
  width: 100%;
  height: 100%;
  mix-blend-mode: hard-light;
  opacity: 1;
}

.hero h1 {
  display: flex;
  margin-top: 15%;
  font-size: 50px;
  max-width: 1000px;
  text-align: center;
  color: var(--color-primary);
  line-height: 2;

}

.hero h3 {
  top: 15%;
  font-size: 20px;
  max-width: 700px;
  text-align: center;
  margin-top: 5%;
  color: var(--text-color-primary);
}


/*
.hero button {
  background: var(--color-secondary);
  color: var(--color-primary);
  border-radius: var(--button-radius);
  margin-top: 15%;
  width: 220px;
  height: 70px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.5s ease-in-out;
  font-size: large;
  box-shadow: 0 0 10px var(--color-primary);
  font-size: 30px;
  border: none;
  outline: none;
  font-weight: 700;
  letter-spacing: 2px;
  background-size: 200%;
  letter-spacing: 0.5px; 
  text-decoration: none;
}

.hero button:hover {
  background: var(--color-primary);
  color: var(--text-color-primary);
  font-size: larger;
  box-shadow: 0 0 15px var(--color-secondary);
}
*/


.d3button {
  /* Basic button styling */
  margin-top: 5%;
  display: inline-block;
  width: 220px;
  height: 70px;
  line-height: 70px;
  font-weight: 700; 
  font-size: 30px;
  padding: 0 20px;
  border-radius: 16px; /* Rounded edges for 3D look */
  color: var(--color-primary);
  background-color: var(--color-secondary); /* Base color */
  text-align: center;
  border: none;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  direction: rtl; /* Right-to-left for Arabic text */
  z-index: 10;
  user-select: none;


  touch-action: manipulation; /* Improves mobile touch responsiveness */
  -webkit-tap-highlight-color: transparent; /* Removes default tap highlight */
  

  /* Inner shadow and gradient for bulging effect */
  background-image: radial-gradient(
    circle at 30% 30%, /* Light source for bulge */
    rgba(255, 255, 255, 0.4) 0%, /* Highlight */
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  box-shadow: 
    inset 0 -2px 4px rgba(0, 0, 0, 0.2), /* Inner shadow for depth */
    inset 0 2px 4px rgba(255, 255, 255, 0.3), /* Inner highlight */
    0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle outer shadow for lift */

  /* Smooth transition for interactions */
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Hover effect: enhance bulge and lift (desktop) */
.d3button:hover {
  transform: translateY(-3px); /* Slight lift */
  box-shadow: 
    inset 0 -3px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 6px rgba(255, 255, 255, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.3); /* Stronger outer shadow */
  background-image: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.5) 0%, /* Brighter highlight */
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
}

/* Focus effect: similar to hover for accessibility */
.d3button:focus {
  outline: none; /* Removes default focus outline */
  transform: translateY(-3px); /* Same lift as hover */
  box-shadow: 
    inset 0 -3px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 6px rgba(255, 255, 255, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.3); /* Same shadow as hover */
  background-image: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
}

/* Active effect: press down, reduce bulge (mobile tap and click) */
.d3button:active {
  transform: translateY(2px); /* Push down */
  box-shadow: 
    inset 0 3px 6px rgba(0, 0, 0, 0.3), /* Deeper inner shadow */
    inset 0 -3px 6px rgba(255, 255, 255, 0.2),
    0 3px 6px rgba(0, 0, 0, 0.1); /* Reduced outer shadow */
  background-image: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.2) 0%, /* Dimmer highlight */
    rgba(255, 255, 255, 0.05) 50%,
    transparent 70%
  );
}









/*
.parallax {
  transition: transform 1s linear;
}
*/

.the-light-box {
  position: fixed;
  top: 60%;
  width: 60%;
  height: 40vh;
  opacity: 0;
  filter: blur(10px);

}

.signin-page {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--body-bg-color);
  box-shadow: 0 0 15px var(--box-shadow); 
  border-radius: 20px;

}

.signin-page h1 {
  font-size: 40px;
  font-weight: bold;
}

.signin-page input {
  padding: 7.5px 30px;
  background-color: lightgray;
  width: 60%;
  height: 40px;
  border: none;
  outline: none;
  border-radius: 5px;
  margin-bottom: 5px;
}

.signin-page button {

  width: 50%;
  height: 40px;
  font-size: 20px;
  font-weight: 700;
  background: var(--color-primary);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-color-primary);
}

.signin-page p {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  height: 40px;
  font-size: 20px;
  font-weight: 700;
  background: var(--color-secondary);
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-color-primary);

}

.signin-page div {
  position: absolute;
  top: 3%;
  right: 3%;
  font-size: 40px;
  cursor: pointer;
  transition: 0.3s;
}

.signin-page div:hover {
  opacity: 0.7;
}

.openlightbox {
  animation: lightboxopen 0.9s forwards;
}

@keyframes lightboxopen {
  to {
    filter: blur(0);
    opacity: 1;
    top: 30%
  }
  
}

.closelightbox {
  animation: lightboxclose 0.9s forwards;

}

@keyframes lightboxclose {

  from {
    filter: blur(0);
    opacity: 1;
    top: 30%;
  }
  to {
    filter: blur(10);
    opacity: 0;
    top: 60%;
  }
}



main {
  flex-grow: 1;
}

header, footer { 
  flex-shrink: 0;
}

/* Utility Class for Loading Transition */
body.loading-transition {
  opacity: 0.7;
  pointer-events: none; /* Prevent further clicks during transition */
}


.navq > a { /* Direct child 'a' (logo link) */
  display: flex; /* Helps with vertical alignment of image if needed */
  align-items: center;
}

.navq img { /* Logo image */
  height: auto; /* Allow image to scale based on width, if style attribute for height is removed */
  /* Style attribute `style="height: 70px; width: 140px;"` will override this if present */
}

/* Hamburger Menu Icon */
.menu_icon_box {
  z-index: 27; /* Above dropsidemenu when closed */
  width: var(--menu-icon-size);
  height: var(--menu-icon-size);
  background-color: var(--text-color-light);
  /* margin: 30px; /* Reduced by positioning it absolutely */
  position: relative; /* Changed from absolute for simpler layout within navq */
  border-radius: 5px;
  border: 3px solid var(--color-primary);
  box-shadow: 0px 0px 10px rgba(172, 18, 18, 0.5);
  transition: 0.5s ease-in-out;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px; /* Adjust padding for lines */
}

.line1, .line2, .line3 {
  width: 80%; /* Relative to parent box */
  max-width: 40px; /* Max width for lines */
  height: 4px;
  margin: 4px 0; /* Adjusted for centering */
  background-color: var(--color-primary);
  border-radius: 50px;
  transition: 0.5s ease-in-out;
}

.menu_icon_box.active .line1 {
  transform: translateY(8px) rotate(45deg); /* Adjust translate based on line height and margin */
}
.menu_icon_box.active .line2 {
  opacity: 0;
}
.menu_icon_box.active .line3 {
  transform: translateY(-8px) rotate(-45deg); /* Adjust translate */
}

/* Dropdown/Sidenav Menu */
.dropsidemenu {
  height: 100vh;
  background-color: var(--color-secondary);
  position: fixed;
  text-align: right;
  z-index: 26; /* Below menu_icon_box when closed, above content when open */
  opacity: 0;
  right: -100%; /* Start fully off-screen */
  width: 280px; /* Fixed width, or use min/max-width */
  max-width: 80%; /* Ensure it doesn't take full screen on small devices */
  pointer-events: none;
  transition: right 0.4s ease-in-out, opacity 0.4s ease-in-out;
  top: 0px;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.dropsidemenu.active {
  opacity: 1;
  pointer-events: auto;
  right: 0px;
}

.navs {
  padding-top: 80px; /* Space for navq */
  width: 100%;
  flex-grow: 1; /* Allow navs to take available space */
  overflow-y: auto; /* Scroll if content exceeds height */
}

.navs ul {
  margin: 0px 30px;
  padding: 0;
}

.navs ul li {
  list-style: none;
  margin: 10px 0;
}

.navs ul li:hover, .navs ul li:focus-within { /* Added focus-within for keyboard navigation */
  border: 3px solid var(--color-primary);
  border-radius: 8px;
}

.navs ul li a {
  color: var(--color-primary);
  font-size: 24px; /* Slightly reduced for better fit */
  padding: 10px;
  text-decoration: none; /* Removed !important, ensure specificity handles it */
  display: block;
  outline: none; /* For focus, rely on li:focus-within border */
}

.dropsidemenu-logo {
  display: block;
  margin: 20px auto 20px auto; /* Centered with space */
}


/* ================== General Page Title & Buttons ================== */

.title_text {
  color: var(--primary-accent-color);
  font-size: clamp(42px, 5vw, 32px); /* Responsive font size */
  text-align: center;
  border-radius: 10px;
  align-self: center;
  text-shadow: 0.3em 0.3em 3em rgba(126, 108, 108, 0.527);


}

.g_title {
  font-size: clamp(24px, 5vw, 32px); /* Responsive font size */
  color: var(--text-color-light);
  text-align: center;
  padding: 15px;
  background: linear-gradient(45deg, #000, #301a76);
  border-radius: 40px;
  margin: 10px 20px;
  box-shadow: 0.3em 0.3em 1em rgba(126, 120, 108, 0.527);

  align-self: center;

}

.g_text {
  font-size: 28px;
  /*color: var(--primary-color);*/
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  display: inline-block;
  text-decoration: none;
  border: none;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  /*-webkit-text-fill-color: transparent;*/
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.q_title {

  font-size: 28px;
  color: var(--primary-color);
  text-align: center;
  text-decoration: none;
  border: none;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  /*-webkit-text-fill-color: transparent;*/
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.q_button, .g_button {
  display: inline-flex; /* For aligning icon and text */
  align-items: center;
  justify-content: center;
  gap: 8px; /* Space between icon and text */
  font-size: 20px;
  text-align: center;
  padding: 10px 15px;
  border-radius: 10px;
  text-decoration: none;
  border: none; /* If it's a button element */
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.q_button {
  color: white;
  background: linear-gradient(45deg, #301a76, #e50e37);
  box-shadow: 0.1em 0.1em 0.5em rgba(200, 0, 0, 0.2);
  margin-bottom: 10px; /* Default margin */
}
.q_button:hover, .q_button:focus {
  transform: scale(1.05);
  box-shadow: 0.2em 0.2em 0.7em rgba(200, 0, 0, 0.3);
  outline: none;
}

.g_button {
  color: var(--text-color-dark); /* Default, overridden by inline style sometimes */
  background-color: var(--background-color-light); /* Default */
  box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.6);
  margin: 10px;
}
.g_button:hover, .g_button:focus {
  transform: scale(1.05);
  box-shadow: 0.1em 0.1em 0.7em rgba(0, 93, 200, 0.6);
  outline: none;
}

/* Google Button Specific Colors */
.g-blue{ color:#4285F4; }
.o-red{ color:#DB4437; }
.o-yellow{ color:#F4B400; }
.l-green{ color:#0F9D58; }
.e-red { display:inline-block;transform:rotate(-20deg); }


/* ================== Gallery & Cards Styles ================== */
.gallery {
  display: flex;
  justify-content: center;
  /*padding: 20px 0;  Add some padding */
  margin-bottom: 30px;
}

.gallery .images {
  gap: 20px; /* Increased gap */
  width: 90%; /* Use width for better control than max-width */
  max-width: 1400px; /* Max width for large screens */
  /*margin-top: 30px;  Reduced from 50px */
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Center cards if they don't fill the row */
  align-items: stretch; /* Make cards in a row same height if needed */
}

.images .icard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  list-style: none;
  /* margin-bottom: 14px; /* Gap handles this */
  /*box-shadow: 0em 0em 0.5em rgba(82, 55, 255, 0.6);*/
  background-color: rgba(0,0,0,0.3); /* Base background for card */
  width: clamp(280px, 100%, 320px); /* Responsive width */
  min-height: 450px; /* Keep consistent height */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.images .icard:hover, .images .icard:focus-within {
  transform: scale(1.01);
  box-shadow: 0em 0em 1em rgba(82, 55, 255, 0.8);
  z-index: 5; /* Bring to front on hover */
}

.icard img {
  width: 100%;
  height: 200px; /* Fixed height for image part */
  object-fit: cover;
  display: block;
}

.icard2 {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-items: center;
}





.icard img[src=""], .icard img:not([src]) { /* Broken image placeholder */
  background: #ccc;
  height: 200px; /* Match image height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  content: "Image not available"; /* Pseudo-content, might not work directly on img */
}



.icard .details {
  flex-grow: 1; /* Take remaining space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
}

.generative {
  color: var(--text-color-light);
  padding-right: 5px; /* Adjust from 10px */
  margin-bottom: 10px;
}
.details .generative span { /* Bot name */
  font-size: 1.4rem; /* Reduced from 1.5rem */
  font-weight: bold;
  display: block; /* Ensure it takes full width */
  margin-bottom: 5px;
  text-align: center;
}
.details .generative .desc {
  /* font-size: 0.95rem;  Reduced from 1rem */
  font-weight: normal;
  line-height: 1.4;
  margin-left: 0; /* Align with name */
  /* Ellipsis for long descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(0.95rem * 1.4 * 3); /* Approximate height for 3 lines */
}

.additional-info {
  padding-top: 10px; /* Space above meta/tags */
  font-weight: normal;
  font-size: 0.9rem;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-color-light);
  margin-bottom: 10px;
  padding: 0 5px; /* Slight horizontal padding */
}

.meta .creator span { /* For the username part */
  color: var(--primary-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* Reduced gap */
  margin-bottom: 5px;
  padding: 0 5px; /* Slight horizontal padding */
}
.tag {
  /*background-color: var(--icard-tag);*/
  background: linear-gradient(45deg, #000, #14024b);
  color: white;
  padding: 3px 8px; /* Slightly more padding */
  border-radius: 5px; /* More rounded */
  font-size: 0.8rem;
}
.tag.dialect-tag {
  background-color: #550011; /* Specific color for dialect */
  margin-top: 5px;
}


.icard2 img {
  height: 250px; /* Fixed height for image part */
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.icard2 .details2 {
  flex-grow: 1; /* Take remaining space */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.generative2 {
  color: var(--text-color-dark);
}
.details2 .generative2 span { /* Bot name */
  font-size: 2rem; /* Reduced from 1.5rem */
  font-weight: bold;
  display: block; /* Ensure it takes full width */
  margin-bottom: 5px;
  text-align: center;
  color: var(--text-color-dark);
}
.details2 .generative2 .desc2 {
  /* font-size: 0.95rem;  Reduced from 1rem */
  font-weight: normal;
  line-height: 1.4;
  margin-left: 0; /* Align with name */
  /* Ellipsis for long descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(0.95rem * 1.4 * 3); /* Approximate height for 3 lines */
}

.additional-info2 {
  padding-top: 10px; /* Space above meta/tags */
  font-weight: normal;
  font-size: 0.9rem;
}

.meta2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-color-light);
  margin-bottom: 10px;
  padding: 0 5px; /* Slight horizontal padding */
}

.meta2 .creator2 span { /* For the username part */
  color: var(--primary-color);
}

.tags2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* Reduced gap */
  margin-bottom: 5px;
  padding: 0 5px; /* Slight horizontal padding */
}
.tag2 {
  /*background-color: var(--icard-tag);*/
  background: linear-gradient(45deg, #000, #14024b);
  color: white;
  padding: 3px 8px; /* Slightly more padding */
  border-radius: 5px; /* More rounded */
  font-size: 0.8rem;
}
.tag2.dialect-tag2 {
  background-color: #550011; /* Specific color for dialect */
  margin-top: 5px;
}



/* Container for all buttons */
.char-buttons {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

/* ===== Shared button styles ===== */
.char-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.25);;
  cursor: pointer;
  font-size: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* ===== Icon styling ===== */
.char-buttons ion-icon {
  font-size: 38px;
}

.char-buttons2 {
  bottom: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: 260px;
  margin-top: -48px;
}

/* ===== Shared button styles ===== */
.char-buttons2 button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.25);;
  cursor: pointer;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* ===== Icon styling ===== */
.char-buttons2 ion-icon {
  font-size: 38px;
}




/* ===== Call & Chat: Always visible ===== */


.card-edit-btn, .card-delete-btn {
  width: 38px;
  height: 38px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);

}

.card-call-btn, .card-chat-btn {
  width: 70px;
  height: 70px;
}

.card-call-btn {
  color: rgb(45, 179, 18);
  box-shadow: 0 0 10px rgb(45, 179, 18);
}


.card-chat-btn {
  color: rgb(0, 132, 255);
  box-shadow: 0 0 10px rgb(0, 132, 255);
}



/* ===== Call & Chat: Always visible ===== */
.card-chat-btn {
  box-shadow: 0 0 10px rgb(0, 132, 255);
}

.card-call-btn:hover,
.card-call-btn:focus {
  background-color: rgb(45, 179, 18);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--secondary-color);
  display: inline-block;
}

.card-chat-btn {
  color: rgb(0, 132, 255);
}
.card-chat-btn:hover,
.card-chat-btn:focus {
  background-color: rgb(0, 132, 255);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--secondary-color);
  display: inline-block;
}

/* ===== Edit & Delete: Hidden until hover/focus ===== */
.card-edit-btn,
.card-delete-btn {
  display: none;
  color: var(--text-color-dark);
}
.icard:hover .card-edit-btn,
.icard:hover .card-delete-btn,
.icard:focus-within .card-edit-btn,
.icard:focus-within .card-delete-btn {
  display: flex;
}
.card-edit-btn:hover,
.card-delete-btn:hover {
  background-color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}



/* ================== Lightbox (Modal) Styles ================== */
.overlay {
  width: 100%;
  height: 100%;
  display: none; /* Hidden by default, shown by JS by adding .show */
  background: rgba(0,0,0,0.75); /* Darker backdrop */
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;

}
.overlay.show {
  display: block; /* Show overlay */
  -webkit-pointer-events: auto;
  pointer-events: auto;

}


.lightbox {
  width: 100%;
  height: 100%;
  display: none; /* Hidden by default, shown by JS by adding .show */
  background: rgba(0,0,0,0.65); /* Darker backdrop */
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto; /* Allow scrolling if content is too tall */
}
.lightbox.show {
  display: flex; /* Use flex to center wrapper */
  align-items: center;
  justify-content: center;
}
.lightbox .wrapper {
  /* position, top, left, transform are not needed if lightbox is flex container */
  width: 90%;
  max-width: 500px; /* Reduced from 600px for better fit */
  padding: 25px; /* Increased padding */
  background: var(--background-color-light);
  color: var(--text-color-dark); /* Text inside lightbox */
  border-radius: 8px; /* Softer radius */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lightbox .wrapper .g_text { /* g_text inside lightbox */
  color: var(--primary-color); /* Ensure consistent color */
}


/* ================== Form Input Styles (Animated Label) ================== */
.inputBox {
  position:relative;
  width: 250px;
  margin: 15px 0; /* Add some margin */
}
.inputBox input {
  width: 100%;
  padding: 10px; /* Consistent padding */
  border: 2px solid rgba(0, 0, 0, 0.25);
  background: white;
  border-radius: 5px;
  outline: none;
  font-size: 1.1em; /* Adjusted */
  transition: border-color 0.3s ease;
  color: var(--text-color-dark);
}
.inputBox span { /* Floating label */
  position: absolute;
  right: 12px; /* Position from right */
  top: 10px;   /* Align with input padding */
  padding: 0 5px; /* Padding for background */
  pointer-events: none;
  font-size: 1.1em;
  color: rgba(0, 0, 0, 0.5);
  background-color: white; /* To cover the input border when floated */
  transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}
.inputBox input:focus ~ span,
.inputBox input:valid ~ span {
  transform: translateY(-22px) translateX(0); /* Adjust Y based on font and padding */
  font-size: 0.9em; /* Smaller font when floated */
  color: var(--primary-color);
  font-weight: bold;
}
.inputBox input:focus {
  border-color: var(--primary-color);
}


/* ================== Character Creation Form Styles ================== */
.form-container {
    max-width: 600px;
    margin: 30px auto;
    margin-top: 100px;
    padding: 25px;
    background-color: #bababa;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    direction: rtl; /* Right-to-left for Arabic */
    text-align: right;
}
.character-form {
  background: #ffe4e4; /* Keep specific form background */
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  color: var(--text-color-dark);
}
.character-form h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: bold;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: var(--font-family-base);
  background-color: white;
  color: var(--text-color-dark);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 55, 96, 0.2);
  outline: none;
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
}
.form-group input[type="file"] {
  padding: 0.5rem; /* Give file input some padding too */
  background-color: transparent; /* Remove default browser styling */
  border: 1px dashed #ddd; /* Dashed border for file input */
}
.character-form button[type="submit"] { /* Submit button within this specific form */
  width: 100%;
  padding: 0.75rem; /* Increased padding */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem; /* Adjusted */
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}
.character-form button[type="submit"]:hover,
.character-form button[type="submit"]:focus {
  background-color: #e02850; /* Darker shade of primary */
  transform: translateY(-2px);
  outline: none;
}
.character-form button[type="submit"]:active {
  transform: translateY(0);
}

/* Custom Select Arrow */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 1rem center; /* Changed to left for RTL */
  background-size: 1em;
  padding-right: 1rem; /* Default padding */
  padding-left: 2.5rem; /* Space for arrow on the left */
}

/* Switch (Toggle) Styles */
.switch-container {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start; /* Default for LTR, works for RTL due to overall form direction */
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 25px;
}
.switch input { display: none; } /* Hide checkbox */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 25px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 4px; bottom: 3.5px; /* Centered */
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(24px); }
#visibilityLabel { /* Label for the switch */
  font-size: 1rem; /* Matched to form input text */
  font-weight: normal; /* Normal weight like other labels */
  color: #555;
}


/* ================== Footer Styles ================== */
footer {
  width: 100%;
  background-color: var(--color-secondary);
  color: var(--text-color-dark); /* Changed to light for better contrast on dark bg */
  padding: 2rem 0;
  margin-top: 20px;
  border-top: 3px solid var(--primary-color); /* Add a separator */
}
footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align items to top */
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-logo {
  text-align: center;
  min-width: 150px;
}
.footer-logo img {
  max-width: 140px; /* Match nav logo width */
  height: auto;
  margin-bottom: 0.5rem;
}
.footer-logo p {
  font-size: 0.9rem;
  margin: 0;
}
.footer-links {
  flex: 2 1 300px; /* Allow more space for links */
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap; /* Allow links to wrap */
  gap: 1rem 1.5rem; /* Row and column gap */
}
.footer-links a {
  color: var(--text-color-dark);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}
.footer-links a:hover, .footer-links a:focus {
  color: var(--primary-color); /* Highlight on hover/focus */
  outline: none;
}
.footer-social {
  flex: 1 1 150px;
  text-align: center; /* Center social icons if they are alone */
}
.footer-social ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  justify-content: center; /* Center icons if in a column or single row */
}
.footer-social img { /* If using img tags for social icons */
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}
.footer-social a:hover img, .footer-social a:focus img {
  transform: scale(1.15); /* Slightly larger zoom */
}
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}

/* ================== Fixed Bottom Action Bar ================== */
.navbarb {
  width:100%;
  display: flex;
  align-items: center;
  justify-content: center; /* Center the button */
  padding: 10px 4px; /* More vertical padding */
  position: fixed;
  bottom: 0;
  left: 0; /* Align to left edge for full width */
  /* transform: translateX(-50%); /* Not needed if left is 0 and width is 100% */
  z-index: 15;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.85)); /* Stronger gradient */
}
/* .bbottom class seems redundant if .navbarb is styled directly, keeping for compatibility */
.navbarb .q_button { /* Style the button within this bar */
  margin-bottom: 0; /* Override default q_button margin */
  width: auto; /* Allow button to size to content */
  max-width: 300px; /* Max width for the button */
}


/* ================== Offers & Ads Section (Front Page) ================== */
.importantnews {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px; /* Add gap between offer boxes */
  margin: 30px auto; /* Centered with auto margin */
  padding: 0 15px; /* Padding on sides */
  max-width: 900px; /* Max width for this section */
}
.importantwords {
  padding: 20px;
  /*width: clamp(200px, 45%, 300px);  Responsive width */
  min-height: 150px; /* Minimum height */
  background: radial-gradient(circle at 50% 50%, #dcedff, #301a76);
  font-size: 1.1rem; /* Adjusted */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color-dark); /* Text inside offer */
  border-radius: 10px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.importantwords .g_button { /* Button inside offer */
  font-size: 18px; /* Slightly smaller */
  width: auto; padding: 8px 15px;
  /* background: var(--primary-color) !important; Ensure override if inline style conflicts */
  background: linear-gradient(45deg, #301a76, #e50e37);
  color: white !important;
}

/* Animated Border for Offer (Performance consideration for blur)
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.importantwords::before, .importantwords::after {
  content: "";
  position: absolute;
  width: calc(100% + 8px); /
  height: calc(100% + 8px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  border-radius: 14px; 
}
.importantwords::before {
  background-image: conic-gradient(from var(--angle), var(--primary-color), var(--secondary-color), var(--secondary-color) , #301a76, #000000, #020101, var(--primary-color));
  animation: 3s spin linear infinite;
  filter: blur(3px); 
  opacity: 0.8;
}
.importantwords::after { 
   background-image: conic-gradient(from var(--angle), transparent 70%, white); 
   filter: blur(10px); 
} */

/* Add to your root.css */
.feature-spotlight {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* Example: Purple/Blue gradient */
    /* Or use a distinct border */
    /* border: 3px dashed var(--primary-color); */
    color: white; /* Ensure text is readable */
}
.feature-spotlight h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: white; /* Or a light accent color */
}
.feature-spotlight p {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #e0e0e0; /* Light grey for description */
}
.feature-spotlight .g_button {
    background-color: var(--primary-color) !important; /* Make it pop */
    color: white !important;
    font-weight: bold;
}

/* Styles for Edit Space Page */
.image-preview-container {
    text-align: center;
    margin-bottom: 15px;
}

.space-cover-preview {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#regenerateImageBtn {
    margin: 0 auto; /* Center the button */
    display: block;
}



@keyframes spin {
  to { --angle: 360deg; }
}


/* ================== Responsive Adjustments ================== */

@media (max-width: 480px) {
  .gallery .images { width: 95%; gap: 15px; }
  .images .icard { max-width: 320px; /* Full width on very small screens */ }
  .inputBox { width: 100%; max-width: 250px; margin-left: auto; margin-right: auto;}
  .character-form { padding: 1.5rem; }
  .form-group select { background-position: left 0.8rem center; padding-left: 2.2rem; }
  .importantnews { padding: 0px 10px; }
  .importantwords { width: 100%; }
}

/* Fallback for @property --angle if not supported (though widely supported now) */
@supports not (animation: spin 3s linear infinite) {
  .importantwords::before {
    border: 3px solid var(--primary-color); /* Static border as fallback */
    background-image: none;
    animation: none;
  }
}

.home_header {

  display: flex;
  flex-direction: column;
  align-items: center;
}


/* Commented out original search styles - kept for reference if feature is re-added */
/*
.search {
  width: 100%; display: flex; position: fixed; background: #ffffff;
  top: 0; left: 50%; border: 3px solid var(--primary-color);
  transform: translateX(-50%); z-index: 25;
}
.search .content {
  width: 80%; color: #fff; text-align: center;
  position: relative; z-index: 10; margin: 0px 20px;
}
.search h1 { font-size: 2.65rem; font-weight: 600; }
.search p { font-size: 1.5rem; margin-top: 8px; }
.search .search-box {
  border: 3px solid var(--primary-color); height: 55px;
  margin: 20px 0; position: relative;
}
.search-box i {
  position: absolute; left: 15px; top: 50%;
  font-size: 1.4rem; color: #8d8d8d; transform: translateY(-50%);
}
.search-box input {
  width: 100%; height: 100%; outline: none; border: none;
  font-size: 1.1rem; padding-left: 55px; border-radius: 5px;
}
*/


@media screen and (max-width: 768px) {
header .upmenu {
  display: none;
}

.hero h1 {
  display: flex;
  margin-top: 35%;
  font-size: 35px;
  color: var(--text-color-primary);
  line-height: 1.3;


}

.hero h3 {
  top: 22%;
  font-size: 25px;
  max-width: 700px;
  text-align: center;
  margin-top: 5%;
}

.d3button {
  margin-top: 10%;
  border: 1px solid var(--color-primary);
  height: 60px;
  line-height: 60px;

}

.hero-image-cont {
  position: absolute;
  bottom: 10px;
  /*width: 1000px;*/
  width: 120%;
  display: flex;
  align-items: center;
  justify-content: center;
  /*background: linear-gradient(to left, var(--color-primary), var(--color-secondary), var(--color-primary));*/
  background-size: 200%;
  animation: animationGradient 2.5s linear infinite;
  opacity: 1;
  z-index: -10;

}

.hero-image-cont img {
  width: 100%;
  height: 100%;
  mix-blend-mode: hard-light;
  opacity: 1;
}



.head-right .button-box {
  display: none;
}

.head-right .navq {
  display: block;

}

.navs ul {
  margin: 0px 15px;
  padding: 0;
}

.navs ul li {
  list-style: none;
  margin: 10px 0;
}

.navs ul li:hover, .navs ul li:focus-within { /* Added focus-within for keyboard navigation */
  border: 3px solid var(--color-primary);
  border-radius: 8px;
}

.navs ul li a {
  color: var(--color-primary);
  font-size: 20px; /* Slightly reduced for better fit */
  text-decoration: none; /* Removed !important, ensure specificity handles it */
  display: block;
  outline: none; /* For focus, rely on li:focus-within border */
  padding: 5px;
}

.menu_icon_box {
  /* margin: 15px; /* Already handled by navq layout */
  transform: scale(0.9); /* Slightly smaller */
}
.line1, .line2, .line3 {
  height: 3px;
  margin: 3px 0;
}
.menu_icon_box.active .line1 { transform: translateY(6px) rotate(45deg); }
.menu_icon_box.active .line3 { transform: translateY(-6px) rotate(-45deg); }

.footer-content {
  flex-direction: column;
  text-align: center;
  align-items: center; /* Center items in column */
}
.footer-links ul {
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.footer-social ul {
  justify-content: center;
}



}