/* ============ CUSTOM FONTS ============ */
@font-face {
  font-family: 'Doran';
  src: url('./fonts/DORAN-REGULAR.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Doran';
  src: url('./fonts/DORAN-BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peida';
  src: url('./fonts/PEYDA-MEDIUM.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peida';
  src: url('./fonts/PEYDA-BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ============================================
   TECHTMATE - RTL LANDING PAGE
   Palette: #333333, #CC3300, #336666, #77EEEE
   ============================================ */

/* ---------- Base (Dark Theme) ---------- */
:root {
  font-family: 'Peida', 'Tahoma', sans-serif;
  --bg-base: #121212;
  --bg-surface: #1a1a1a;
  --gray: #333333;
  --red: #cc3300;
  --teal: #336666;
  --cyan: #77eeee;
  --white: #f0f0f0;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 40px rgba(204,51,0,0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar specific */
  --nav-bg: transparent;
  --nav-bg-scrolled: rgba(18, 18, 18, 0.92);
  --nav-text: rgba(255,255,255,0.9);
  --nav-text-hover: var(--cyan);
  --nav-logo-color: #fff;

  /* Hero */
  --hero-bg: linear-gradient(145deg, var(--gray) 0%, #1a1a1a 100%);
  --hero-text-color: #fff;
  --hero-subtext: #c0c0c0;

  /* Sections */
  --section-bg: transparent;
  --section-header-color: #fff;
  --section-header-sub: var(--text-secondary);

  /* Cards */
  --card-bg: var(--bg-surface);
  --card-border: var(--border-color);
  --card-text: var(--text-primary);
  --card-subtext: var(--text-secondary);

  /* Stats section */
  --stats-bg: linear-gradient(135deg, #1a1a1a, #0d0d0d);

  /* About */
  --about-image-bg: linear-gradient(135deg, var(--gray), var(--teal));
  --about-text-color: #ddd;

  /* CTA */
  --cta-bg: linear-gradient(135deg, var(--gray), #252525);
  --cta-text: #fff;
  --cta-subtext: #c0c0c0;

  /* Footer */
  --footer-bg: #0a0a0a;
  --footer-text: #888;
  --footer-heading: #fff;
  --footer-border: rgba(255,255,255,0.06);

  /* Toggle button */
  --toggle-bg: rgba(255,255,255,0.1);
  --toggle-color: #fff;
}

/* ---------- Light Theme Overrides ---------- */
body.light-mode {
  --bg-base: #f5f5f5;
  --bg-surface: #ffffff;
  --gray: #555555;
  --red: #cc3300;
  --teal: #336666;
  --cyan: #006666;
  --white: #111111;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 40px rgba(204,51,0,0.1);

  --nav-bg-scrolled: rgba(255, 255, 255, 0.9);
  --nav-text: #333;
  --nav-text-hover: var(--red);
  --nav-logo-color: #1a1a1a;

  --hero-bg: linear-gradient(145deg, #e0e0e0 0%, #f5f5f5 100%);
  --hero-text-color: #1a1a1a;
  --hero-subtext: #444;

  --section-header-color: #1a1a1a;
  --section-header-sub: #555;

  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.08);
  --card-text: #1a1a1a;
  --card-subtext: #555;

  --stats-bg: linear-gradient(135deg, #eaeaea, #f0f0f0);

  --about-image-bg: linear-gradient(135deg, #ddd, #bbb);
  --about-text-color: #1a1a1a;

  --cta-bg: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  --cta-text: #1a1a1a;
  --cta-subtext: #333;

  --footer-bg: #e0e0e0;
  --footer-text: #444;
  --footer-heading: #111;
  --footer-border: rgba(0,0,0,0.1);

  --toggle-bg: rgba(0,0,0,0.1);
  --toggle-color: #111;
}

/* ---------- Global Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  direction: rtl;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6,
.navbar-logo,
.hero-text h1,
.section-header h2,
.feature-card h3,
.about-text h2,
.cta-section h2,
.footer-col h4,
.stat-number {
  font-family: 'Doran', sans-serif;
  font-weight: 700; /* bold for headings */
}

.btn,
.nav-links a,
.footer-col a,
.section-tag {
  font-family: 'Peida', sans-serif;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1rem 2rem; transition: var(--transition);
  background: transparent;
}
.navbar.scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  padding: 0.7rem 2rem;
}
.navbar-container {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-weight: 800; font-size: 1.6rem;
  color: var(--nav-logo-color); letter-spacing: -0.02em;
  transition: color 0.3s;
}
.logo-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}
.nav-links {
  display: flex; list-style: none; gap: 0.5rem; align-items: center;
}
.nav-links a {
  text-decoration: none; color: var(--nav-text); font-weight: 500;
  font-size: 0.95rem; padding: 0.55rem 1.2rem; border-radius: 50px;
  transition: var(--transition);
}
.nav-links a:hover {
  background: rgba(119,238,238,0.1); color: var(--nav-text-hover);
}
.btn-nav {
  background: var(--red) !important; color: #fff !important;
  font-weight: 700 !important; padding: 0.6rem 1.6rem !important;
  border-radius: 50px !important; box-shadow: 0 4px 12px rgba(204,51,0,0.4);
}
.btn-nav:hover {
  transform: translateY(-2px); box-shadow: 0 8px 25px rgba(204,51,0,0.6);
  background: #e63900 !important;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--toggle-bg);
  border: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  color: var(--toggle-color); font-size: 1.2rem;
  margin-right: 0.5rem;
}
.theme-toggle:hover {
  background: var(--red);
  color: #fff;
}

/* Mobile menu */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; background: none; border: none; padding: 8px; }
.hamburger span { display: block; width: 26px; height: 2.5px; background: var(--nav-logo-color); border-radius: 10px; transition: var(--transition); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 998; opacity: 0; pointer-events: none; transition: var(--transition); }
.overlay.active { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: var(--hero-bg); position: relative; overflow: hidden;
  padding: 7rem 2rem 5rem; transition: background 0.3s;
}
.hero::before {
  content: ''; position: absolute; top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(119,238,238,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-container {
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; position: relative; z-index: 2;
}
.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem); font-weight: 900;
  color: var(--hero-text-color); line-height: 1.3; margin-bottom: 1.5rem;
}
.hero-text .highlight {
  background: linear-gradient(to left, var(--cyan), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  font-size: 1.15rem; color: var(--hero-subtext);
  margin-bottom: 2.5rem; max-width: 480px; line-height: 2;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border-radius: 50px; font-weight: 700;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  border: none; transition: var(--transition); font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(204,51,0,0.5); background: #e63e00; }
.btn-outline { background: transparent; color: var(--cyan); border: 2px solid var(--cyan); }
.btn-outline:hover { background: rgba(119,238,238,0.1); border-color: var(--hero-text-color); color: var(--hero-text-color); }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-illustration { width: 100%; max-width: 450px; aspect-ratio: 1/1; position: relative; }
.hero-circle {
  width: 280px; height: 280px; border-radius: 50%;
  border: 2px dashed var(--cyan); display: flex;
  align-items: center; justify-content: center;
  animation: spin 30s linear infinite;
}
.hero-circle-inner {
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(51,102,102,0.3); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.floating-card {
  position: absolute; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 1rem 1.5rem; display: flex;
  align-items: center; gap: 0.8rem; font-weight: 600; font-size: 0.9rem;
  color: var(--card-text); box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}
.card-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.dot-red { background: var(--red); } .dot-teal { background: var(--teal); } .dot-cyan { background: var(--cyan); }
.card-1 { top: 5%; right: 5%; animation-delay: 0s; }
.card-2 { bottom: 15%; left: 0; animation-delay: 2s; }
.card-3 { top: 45%; left: 8%; animation-delay: 4s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* ---------- Sections ---------- */
.section { padding: 6rem 2rem; }
.section-container { max-width: 1280px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; background: rgba(119,238,238,0.1);
  color: var(--cyan); font-weight: 700; font-size: 0.85rem;
  padding: 0.4rem 1.2rem; border-radius: 50px; margin-bottom: 1rem;
}
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 900; color: var(--section-header-color); margin-bottom: 1rem; }
.section-header p { color: var(--section-header-sub); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 2.2rem 2rem;
  transition: var(--transition); position: relative; overflow: hidden;
  color: var(--card-text);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--teal));
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s ease;
}
.feature-card:hover { transform: translateY(-8px); border-color: var(--teal); box-shadow: 0 20px 30px rgba(0,0,0,0.3); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; margin-bottom: 1.3rem;
  background: rgba(204,51,0,0.15); transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--red); color: #fff; box-shadow: 0 8px 25px rgba(204,51,0,0.5); }
.feature-card h3 { font-weight: 800; font-size: 1.2rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--card-subtext); font-size: 0.95rem; }

/* ---- Scroll-triggered hover class (mobile) ---- */
.feature-card.card-hovered {
  transform: translateY(-8px);
  border-color: var(--teal);
  box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}
.feature-card.card-hovered::before {
  transform: scaleX(1);
}
.feature-card.card-hovered .feature-icon {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 25px rgba(204,51,0,0.5);
}
/* Stats */
.stats-section { background: var(--stats-bg); padding: 5rem 2rem; transition: background 0.3s; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.stat-number {
  font-size: 3rem; font-weight: 900;
  background: linear-gradient(to left, var(--red), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { color: var(--text-secondary); font-weight: 500; margin-top: 0.5rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image {
  width: 100%; max-width: 450px; aspect-ratio: 4/3;
  background: var(--about-image-bg); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem; box-shadow: var(--shadow-md); transition: background 0.3s;
}
.about-text h2 { font-size: 2rem; font-weight: 900; margin-bottom: 1.5rem; color: var(--section-header-color); }
.about-text p { color: var(--text-secondary); margin-bottom: 1rem; }
.about-list { list-style: none; margin-top: 1.5rem; }
.about-list li { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; color: var(--about-text-color); }
.check-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(51,102,102,0.3); color: var(--cyan);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

/* CTA */
.cta-section {
  background: var(--cta-bg); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); margin: 4rem 2rem; padding: 4rem 3rem;
  text-align: center; position: relative; overflow: hidden;
  transition: background 0.3s;
}
.cta-section h2 { font-size: 2.2rem; font-weight: 900; color: var(--cta-text); margin-bottom: 1rem; }
.cta-section p { color: var(--cta-subtext); margin-bottom: 2rem; }
.btn-cta { background: var(--red); color: #fff; font-size: 1.1rem; padding: 1rem 2.5rem; }
.btn-cta:hover { background: #e64800; transform: translateY(-4px); }

/* Footer */
.footer {
  padding: 4rem 2rem 2rem; transition: background 0.3s;
}
.footer-container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.footer-col h4 { color: var(--footer-heading); margin-bottom: 1.2rem; }
.footer-col a { color: var(--footer-text); text-decoration: none; display: block; margin-bottom: 0.5rem; transition: var(--transition); }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--footer-border); color: #555; }


/* ========== CONTACT MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 10px;
  left: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}
.modal-close:hover {
  color: var(--red);
}
.modal-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--section-header-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.modal-title {
  font-family: 'Pinar', 'Vazirmatn', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--section-header-color);
  margin-bottom: 2rem;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.contact-item:hover {
  background: rgba(119,238,238,0.1);
}
.contact-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Light mode overrides for modal */
body.light-mode .modal-overlay {
  background: rgba(0,0,0,0.5);
}
body.light-mode .contact-item {
  background: rgba(0,0,0,0.03);
}
body.light-mode .contact-item:hover {
  background: rgba(51,102,102,0.1);
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-image { max-width: 350px; margin: 0 auto; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: 280px;
    background: var(--bg-surface); flex-direction: column; padding: 6rem 2rem;
    box-shadow: var(--shadow-md); transform: translateX(100%);
    transition: var(--transition); z-index: 999;
  }
  .nav-links.active { transform: translateX(0); }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .hero { padding: 6rem 1rem 3rem; }
  .section { padding: 3rem 1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}


.open-contact-btn {
  cursor: pointer;
}
/* Logo image in navbar */
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Logo image in modal */
.modal-logo-img {
  width: 80px;
  height: auto;
  object-fit: contain;
}


/* ---------- Navbar layout (always) ---------- */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* theme toggle base */
.theme-toggle {
    background: var(--toggle-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--toggle-color);
    transition: var(--transition);
    flex-shrink: 0;
}

/* Desktop: nav-links visible, toggle at end */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
}

/* Mobile: hide nav-links, keep toggle on right */
@media (max-width: 968px) {
    .nav-links {
        display: none !important;
    }

    /* optional: ensure toggle has no extra margin */
    .theme-toggle {
        margin-right: 0;
    }

    /* remove any leftover hamburger/overlay styles (safe) */
    .hamburger, .overlay {
        display: none !important;
    }
}
