/* ==========================================================================
   1. CSS VARIABLES (DESIGN SYSTEM)
   ========================================================================== */
:root {
  /* Colors */
  --primary-color: #45a3d6;
  --secondary-color: #ee5a56;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --focus-ring: rgba(69, 163, 214, 0.25);
  
  /* Status Colors */
  --success: #27ae60;
  --danger: #c0392b;

  /* Typography */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  
  /* Utilities */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. BASE & RESET
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:active {
  color: var(--secondary-color);
}

/* Responsive Media */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   3. TYPOGRAPHY & HEADINGS
   ========================================================================== */
.banner-bottom-grid h3,
.services-grid-right h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
  line-height: 1.3;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.banner-bottom-grid h3::after,
.services-grid-right h3::after {
  content: '';
  width: 35%;
  max-width: 80px;
  height: 3px;
  background: var(--primary-color);
  position: absolute;
  bottom: -1px;
  left: 0;
  border-radius: 2px;
}

.banner-bottom-grid h3 span,
.services-grid-right h3 span {
  color: var(--primary-color);
}

.banner-bottom-grid h2 {
  margin: 1rem 0;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}

.banner-bottom-grid p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

.banner-bottom-grid p span {
  display: block;
  margin: 1rem 0 1.5rem;
}

/* ==========================================================================
   4. COMPONENTS & LAYOUT
   ========================================================================== */

/* Banner Containers */
.banner-info {
  text-align: center;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  background: url(../images/ajax-loader.gif) center center no-repeat;
  border-radius: var(--radius-md);
}

.member-section {
  background: var(--bg-surface);
  padding: clamp(2rem, 5vw, 4rem) 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Interactive Status Badges/Buttons */
.callback,
.simple,
.offset {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  background: var(--success);
  padding: 0.6em 1.2em;
  color: #ffffff;
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.callback:hover,
.simple:hover,
.offset:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.offset {
  margin-bottom: 0.625rem;
}

.callback {
  cursor: pointer;
}

.ended {
  background: var(--danger);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 99;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-color);
}

/* Counter / Styled Layouts */
.styled {
  display: flex;
  gap: 15px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.styled div {
  font-size: 1.875rem;
  font-weight: 300;
  line-height: 1;
  text-align: right;
  flex: 1 1 auto;
}

.styled div span {
  display: block;
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-muted);
}

/* ==========================================================================
   5. FORMS & INPUTS
   ========================================================================== */
.left-inner-addon,
.right-inner-addon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.left-inner-addon input,
.right-inner-addon input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.left-inner-addon input { padding-left: 2.5rem; }
.right-inner-addon input { padding-right: 2.5rem; }

.left-inner-addon i,
.right-inner-addon i {
  position: absolute;
  pointer-events: none;
  color: var(--text-muted);
}

.left-inner-addon i { left: 0.75rem; }
.right-inner-addon i { right: 0.75rem; }

.input, select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}

.input:focus,
select:focus,
#amots:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background-color: #ffffff;
}

#amots {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--border-color);
}

/* Custom Checkbox/Radio Modernization */
.Form-section {
  margin-bottom: 1.5rem;
}

.Form-section + .Form-section {
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

.Form-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.Form-label--tick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-right: 1rem;
}

/* Modern Accessible Hidden Checkbox */
.Form-label-radio,
.Form-label-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.Form-label-text::before {
  content: "";
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: sub;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-right: 0.5rem;
  transition: var(--transition);
}

.Form-label-radio + .Form-label-text::before {
  border-radius: 50%;
}

.Form-label-radio:checked + .Form-label-text::before,
.Form-label-checkbox:checked + .Form-label-text::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: inset 0 0 0 3px #fff;
}

/* Modern Toggle Switch */
.switch {
  display: block;
  margin-bottom: 1.5rem;
}

.toggle {
  display: none;
}

.toggle + label {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  width: 50px;
  height: 26px;
  background-color: #cbd5e1;
  border-radius: 13px;
  transition: var(--transition);
}

.toggle + label::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle:checked + label {
  background-color: var(--primary-color);
}

.toggle:checked + label::after {
  transform: translateX(24px);
}

/* ==========================================================================
   6. CAROUSEL & ROTATORS
   ========================================================================== */
.dg-container {
  width: 100%;
  height: 350px;
  position: relative;
}

.dg-wrapper {
  width: 100%;
  max-width: 350px;
  height: 216px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.dg-wrapper a {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  background-color: var(--bg-surface);
}

/* ==========================================================================
   7. SOCIAL ICONS
   ========================================================================== */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-icons .fa {
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.social-icons.icon-circle .fa { border-radius: 50%; }
.social-icons.icon-flat .fa { border-radius: 0; }

.social-icons .fa:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

/* Color Mappings */
.social-icons .fa-facebook { background-color: #1877f2; }
.social-icons .fa-twitter { background-color: #1da1f2; }
.social-icons .fa-instagram { background-color: #e4405f; }
.social-icons .fa-linkedin { background-color: #0a66c2; }
.social-icons .fa-whatsapp { background-color: #25d366; }
.social-icons .fa-youtube { background-color: #ff0000; }
.social-icons .fa-github { background-color: #24292e; }

/* ==========================================================================
   8. UTILITIES & ANIMATIONS
   ========================================================================== */
#msg_count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Continuous Marquee Banner */
.marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

.marquee:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   9. MEDIA QUERIES (MOBILE FIRST COMPATIBILITY)
   ========================================================================== */
@media (max-width: 600px) {
  .styled {
    flex-direction: column;
  }

  .banner-info {
    width: 100%;
  }

  .toggle + label {
    margin: 0 auto;
  }
}