/* AR Theme Fixes 1.0 — layout fixes + blog cards */
:root{
  --arf-accent:#3B82F6;
  --arf-accent-2:#0ea5e9;
  --arf-ink:#0f172a;
  --arf-muted:#475569;
  --arf-line:#e2e8f0;
  --arf-radius:18px;
  --arf-ease:cubic-bezier(.2,.7,.2,1);
}

/* ---------- 1. Oversized icons (black envelope / Hire Me icon) ---------- */
.elementor-icon svg,
.elementor-button-icon svg,
.elementor-social-icon svg,
.elementor-icon-list-icon svg,
.ast-header-button svg,
.ast-custom-button svg,
.ast-button svg,
.ast-header-button-2 svg {
  width: 1em;
  height: 1em;
  max-width: 1.4em;
  max-height: 1.4em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* ---------- 2. Header button never wraps ---------- */
.ast-header-button,
.ast-custom-button,
.ast-custom-button-link {
  white-space: nowrap;
}

/* ---------- 3. Nav lists: no stray bullets, no duplicated unstyled list on mobile ---------- */
.main-navigation ul,
.main-header-menu,
.ast-mobile-popup-content ul,
.elementor-nav-menu--dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation ul li::marker { content: none; }

/* Skip-to-content link must stay hidden until keyboard focus */
a.skip-link:not(:focus),
.screen-reader-text:not(:focus) {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 4. Footer social icons: no text leaking out of circles ---------- */
.elementor-social-icon {
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
}
.elementor-social-icon i,
.elementor-social-icon svg {
  font-size: 18px;
  text-indent: 0;
}
@keyframes arf-rise {
  from { opacity: 0; translate: 0 48px; scale: .97; }
  to   { opacity: 1; translate: 0 0;     scale: 1; }
}

/* =====================================================================
   HEADER CTA BUTTON (replaces "Hire Me")
   Set avatar: change --arf-cta-avatar below to your photo URL, e.g.
   --arf-cta-avatar: url("https://abdullahraiyan.com/wp-content/uploads/2026/10/avatar.jpg");
   ===================================================================== */
:root { --arf-cta-avatar: none; --arf-navy: #1e3a6e; --arf-navy-2: #16305c; }

.ast-custom-button {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  background: var(--arf-navy);
  color: #fff !important;
  border-radius: 999px;
  padding: 7px 22px 7px 7px !important;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(30, 58, 110, .25);
  transition: transform .3s var(--arf-ease), box-shadow .3s var(--arf-ease), background .3s;
}
.ast-custom-button::before {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff var(--arf-cta-avatar) center / cover no-repeat;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
}
.ast-custom-button:hover,
.ast-custom-button:focus-visible {
  background: var(--arf-navy-2);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(30, 58, 110, .32);
}

/* =====================================================================
   DESKTOP MEGA DROPDOWN (multi-column panel, opens on hover/keyboard)
   Mobile keeps Astra's drawer. Needs submenu items in Appearance → Menus.
   ===================================================================== */
@media (min-width: 922px) {
  .main-header-menu .menu-item { position: relative; }

  .main-header-menu .menu-item > .sub-menu {
    position: absolute !important;
    top: calc(100% + 18px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, 10px);
    width: min(780px, 94vw) !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 28px;
    padding: 26px 28px !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid var(--arf-line);
    border-radius: 18px !important;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .25);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--arf-ease), transform .3s var(--arf-ease), visibility .3s;
    z-index: 999;
  }
  /* invisible bridge so the panel does not close while moving the pointer */
  .main-header-menu .menu-item > .sub-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
  }
  .main-header-menu .menu-item:hover > .sub-menu,
  .main-header-menu .menu-item:focus-within > .sub-menu,
  .main-header-menu .menu-item > .sub-menu.toggled-on {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }

  .main-header-menu .menu-item > .sub-menu > .menu-item > a {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--arf-ink) !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background .25s, color .25s, padding-left .3s var(--arf-ease);
  }
  .main-header-menu .menu-item > .sub-menu > .menu-item > a:hover,
  .main-header-menu .menu-item > .sub-menu > .menu-item > a:focus-visible {
    background: #eef4ff;
    color: var(--arf-accent) !important;
    padding-left: 20px;
  }

  /* Nested items (rare) stay as a plain indented list inside the panel */
  .main-header-menu .menu-item > .sub-menu .sub-menu {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px !important;
    grid-column: 1 / -1;
  }
}

/* Panel is only 1 column on small desktop/tablet widths */
@media (min-width: 922px) and (max-width: 1100px) {
  .main-header-menu .menu-item > .sub-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   PAGE REDESIGN: About, Portfolio, Services
   Targets the real classes of ar-widgets (ar-*) and digitalarch (da-sg-*).
   Scoped to body.page-about / .page-portfolio / .page-services.
   ===================================================================== */
:root { --arf-soft: #f5f8ff; }

/* --- shared: section entrance (scroll-driven, falls back to visible) --- */
@supports (animation-timeline: view()) {
  body.page-about .ar-section-header,
  body.page-portfolio .ar-section-header,
  body.page-services .da-sg-header,
  body.page-about .ar-skill-card,
  body.page-portfolio .ar-project-card,
  body.page-services .da-sg-card {
    animation: arf-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}
@keyframes arf-rise {
  from { opacity: 0; translate: 0 44px; scale: .97; }
  to   { opacity: 1; translate: 0 0;    scale: 1; }
}

/* --- section titles: eyebrow + gradient underline --- */
body.page-about .ar-section-title,
body.page-portfolio .ar-section-title,
body.page-services .da-sg-section-title {
  letter-spacing: -.02em;
  line-height: 1.1;
}
body.page-about .ar-eyebrow,
body.page-portfolio .ar-eyebrow,
body.page-services .da-sg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--arf-accent);
}
body.page-about .ar-eyebrow::before,
body.page-portfolio .ar-eyebrow::before,
body.page-services .da-sg-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--arf-accent), var(--arf-accent-2));
}

/* =========================  PORTFOLIO  ========================= */
body.page-portfolio .ar-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}
body.page-portfolio .ar-project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--arf-line);
  border-radius: var(--arf-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
  transition: transform .45s var(--arf-ease), box-shadow .45s var(--arf-ease), border-color .45s;
}
body.page-portfolio .ar-project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 56px rgba(59, 130, 246, .2);
  border-color: rgba(59, 130, 246, .35);
}
body.page-portfolio .ar-proj-image-wrap,
body.page-portfolio .ar-proj-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf2ff, #f8fafc);
}
body.page-portfolio .ar-proj-img,
body.page-portfolio .ar-proj-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--arf-ease);
}
body.page-portfolio .ar-project-card:hover .ar-proj-img,
body.page-portfolio .ar-project-card:hover .ar-proj-image-wrap img {
  transform: scale(1.07);
}
body.page-portfolio .ar-proj-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
body.page-portfolio .ar-proj-category {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--arf-accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
body.page-portfolio .ar-proj-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--arf-ink);
  margin: 0 0 8px;
}
body.page-portfolio .ar-proj-desc {
  color: var(--arf-muted);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 16px;
}
body.page-portfolio .ar-proj-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--arf-accent);
  text-decoration: none;
}
body.page-portfolio .ar-proj-link-icon { transition: transform .35s var(--arf-ease); display: inline-flex; }
body.page-portfolio .ar-project-card:hover .ar-proj-link-icon { transform: translateX(6px); }
body.page-portfolio .ar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
body.page-portfolio .ar-tag {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--arf-soft);
  color: var(--arf-muted);
  border: 1px solid var(--arf-line);
}

/* =========================  SERVICES  ========================= */
body.page-services .da-sg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
body.page-services .da-sg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--arf-line);
  border-radius: var(--arf-radius);
  padding: 30px 26px 26px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  transition: transform .45s var(--arf-ease), box-shadow .45s var(--arf-ease), border-color .45s;
}
/* accent line that draws across the top on hover */
body.page-services .da-sg-card-line,
body.page-services .da-sg-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--arf-accent), var(--arf-accent-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .6s var(--arf-ease);
}
body.page-services .da-sg-card:hover::before,
body.page-services .da-sg-card:hover .da-sg-card-line { transform: scaleX(1); }
body.page-services .da-sg-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 56px rgba(59, 130, 246, .18);
  border-color: rgba(59, 130, 246, .3);
}
body.page-services .da-sg-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: var(--arf-accent);
  margin-bottom: 18px;
  transition: transform .5s var(--arf-ease), background .4s;
}
body.page-services .da-sg-icon svg { width: 26px; height: 26px; }
body.page-services .da-sg-card:hover .da-sg-icon { transform: rotate(-8deg) scale(1.08); background: var(--arf-accent); color: #fff; }
body.page-services .da-sg-card-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--arf-ink);
  margin: 0 0 10px;
  line-height: 1.3;
}
body.page-services .da-sg-card-desc {
  color: var(--arf-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 18px;
  flex: 1;
}
body.page-services .da-sg-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #7c3aed;
  letter-spacing: .04em;
}
body.page-services .da-sg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--arf-accent);
  text-decoration: none;
}
body.page-services .da-sg-arrow { display: inline-flex; transition: transform .35s var(--arf-ease); }
body.page-services .da-sg-card:hover .da-sg-arrow { transform: translateX(6px); }

/* =========================  ABOUT  ========================= */
body.page-about .ar-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
body.page-about .ar-skill-card {
  background: #fff;
  border: 1px solid var(--arf-line);
  border-radius: var(--arf-radius);
  padding: 26px 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  transition: transform .45s var(--arf-ease), box-shadow .45s var(--arf-ease);
}
body.page-about .ar-skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(59, 130, 246, .16);
}
body.page-about .ar-skill-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eaf2ff, #e0f2fe);
  margin-bottom: 16px;
  transition: transform .5s var(--arf-ease);
}
body.page-about .ar-skill-card:hover .ar-skill-icon-wrap { transform: scale(1.1) rotate(-6deg); }
body.page-about .ar-skill-icon svg { width: 24px; height: 24px; }
body.page-about .ar-skill-title { font-size: 1.15rem; font-weight: 700; color: var(--arf-ink); margin: 0 0 8px; }
body.page-about .ar-skill-desc { color: var(--arf-muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* Stagger siblings so grids cascade in */
body.page-about .ar-skills-grid > .ar-skill-card:nth-child(3n+2),
body.page-portfolio .ar-projects-grid > .ar-project-card:nth-child(3n+2),
body.page-services .da-sg-grid > .da-sg-card:nth-child(3n+2) { animation-delay: 0ms; }

/* Responsive */
@media (max-width: 600px) {
  body.page-portfolio .ar-projects-grid,
  body.page-services .da-sg-grid,
  body.page-about .ar-skills-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body.page-about *, body.page-portfolio *, body.page-services * { animation: none !important; transition: none !important; }
  body.page-about .ar-skill-card:hover,
  body.page-portfolio .ar-project-card:hover,
  body.page-services .da-sg-card:hover { transform: none; }
}

/* =====================================================================
   MOBILE: hero/images stuck grey or half-hidden while the page loads
   Causes: Elementor entrance animations (.elementor-invisible) and lazy-loaded
   placeholders that never swap. On phones, show content immediately.
   ===================================================================== */
@media (max-width: 767px) {
  .elementor-invisible,
  [data-settings*="animation"] {
    visibility: visible !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .elementor-widget-image img,
  .elementor-widget-image picture,
  img[loading="lazy"],
  img.lazyload,
  img.lazyloaded,
  img[data-src] {
    display: block;
    max-width: 100%;
    height: auto;
    background: transparent !important;
    opacity: 1 !important;
    filter: none !important;
  }
  /* Keep the hero image from collapsing into a grey block with no size */
  .elementor-widget-image {
    width: 100%;
  }
  /* Typing-effect headings and centered text should wrap normally on phones */
  .elementor-headline,
  .elementor-widget-heading h1,
  .elementor-widget-heading h2 {
    overflow-wrap: anywhere;
  }
}
/* =====================================================================
   CONSISTENT SIDE PADDING — one gutter for every AR page container
   ===================================================================== */
:root { --ar-gutter: clamp(18px, 4vw, 32px); }
.ar-hm-wrap, .ar-svc, .ar-bl, .ar-fa, .ar-rv, .ar-footer-grid, .ar-footer-cta-inner, .ar-footer-bottom, .ar-mm-wrap {
  padding-left: var(--ar-gutter) !important;
  padding-right: var(--ar-gutter) !important;
  box-sizing: border-box;
}
.ar-hm-wrap { max-width: 1200px; }
@media (max-width: 600px) { .ar-hm-section { padding-top: 56px; padding-bottom: 56px; } }
