/*
Theme Name: LinktreeYS
Theme URI: https://github.com/ayoub002/LinktreeYS
Author: Ayoub Sabbar
Author URI: https://github.com/ayoub002
Description: Page Linktree officielle Yahyaoui Shop adaptée en thème WordPress uploadable.
Version: 1.0.1
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: linktreeys
*/

:root{
  --red:#f21828;
  --red-dark:#cf1121;
  --red-soft:rgba(242,24,40,.14);
  --white:#ffffff;
  --black:#060709;
  --shadow:0 24px 60px rgba(0,0,0,.18);
  --shadow-soft:0 10px 22px rgba(0,0,0,.10);

  --bg:#f2f2f4;
  --bg-2:#eaeaec;
  --card:#fbfbfc;
  --card-border:rgba(0,0,0,.08);
  --text:#0b0d10;
  --muted:#666b73;
  --line:rgba(0,0,0,.10);
  --button:#ffffff;
  --button-border:rgba(0,0,0,.08);
  --toggle-bg:rgba(255,255,255,.78);
}

html[data-theme="dark"]{
  --bg:#070809;
  --bg-2:#101114;
  --card:rgba(15,16,18,.88);
  --card-border:rgba(255,255,255,.11);
  --text:#f6f7f8;
  --muted:#a7adb5;
  --line:rgba(255,255,255,.12);
  --button:rgba(20,21,24,.98);
  --button-border:rgba(255,255,255,.10);
  --toggle-bg:rgba(26,27,30,.94);
  --shadow:0 30px 70px rgba(0,0,0,.55);
  --shadow-soft:0 10px 22px rgba(0,0,0,.28);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 20% 80%, rgba(242,24,40,.08), transparent 20%),
    radial-gradient(circle at 85% 20%, rgba(242,24,40,.08), transparent 24%),
    linear-gradient(180deg,var(--bg),var(--bg-2));
  color:var(--text);
  overflow-x:hidden;
}

.page-bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}

.page-bg::before,
.page-bg::after{
  content:"";
  position:absolute;
  inset:-24%;
  opacity:.42;
  filter:blur(34px);
  transform:rotate(-10deg);
  background:
    linear-gradient(115deg,
      transparent 0 18%,
      rgba(242,24,40,.12) 28%,
      rgba(255,255,255,.18) 36%,
      transparent 48%,
      rgba(207,17,33,.16) 60%,
      transparent 76%),
    repeating-linear-gradient(105deg,
      transparent 0 54px,
      rgba(242,24,40,.08) 76px,
      transparent 116px);
  background-size:180% 180%, 150% 150%;
  animation:aurora-bg-flow 14s ease-in-out infinite;
}

.page-bg::after{
  opacity:.22;
  filter:blur(58px);
  transform:rotate(12deg) scale(1.08);
  animation-duration:18s;
  animation-direction:reverse;
}

html[data-theme="dark"] .page-bg::before{
  opacity:.5;
  background:
    linear-gradient(115deg,
      transparent 0 16%,
      rgba(242,24,40,.20) 28%,
      rgba(255,255,255,.08) 38%,
      transparent 50%,
      rgba(207,17,33,.22) 62%,
      transparent 78%),
    repeating-linear-gradient(105deg,
      transparent 0 54px,
      rgba(242,24,40,.11) 76px,
      transparent 116px);
}

html[data-theme="dark"] .page-bg::after{
  opacity:.28;
}

.bg-line{
  position:absolute;
  border:1px solid rgba(242,24,40,.38);
  border-radius:999px;
  opacity:.9;
}

.bg-line-1{
  width:520px;height:520px;
  left:-340px;bottom:-120px;
}
.bg-line-2{
  width:640px;height:640px;
  right:-430px;top:-180px;
  opacity:.28;
}

.wrapper{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px 14px;
}

.link-card{
  position:relative;
  width:min(100%, 560px);
  border-radius:38px;
  padding:28px 22px 22px;
  background:var(--card);
  border:1px solid var(--card-border);
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
}

html[data-theme="dark"] .link-card{
  background:
    linear-gradient(180deg, rgba(18,19,21,.96), rgba(14,15,17,.92));
}

.theme-toggle{
  position:absolute;
  top:16px;
  right:16px;
  border:none;
  border-radius:999px;
  padding:10px 14px;
  background:var(--toggle-bg);
  border:1px solid var(--button-border);
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
}

.toggle-icon{font-size:16px;line-height:1;color:var(--red)}

.hero{
  text-align:center;
  padding-top:8px;
}

.hero h1{
  max-width:480px;
  margin:12px auto 10px;
  font-size:clamp(23px, 4vw, 34px);
  line-height:1.12;
  font-weight:900;
  color:var(--text);
  background:linear-gradient(110deg, var(--text), var(--red), var(--red-dark), var(--text));
  background-size:260% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:aurora-text-flow 5.5s ease-in-out infinite, aurora-red-glow 3.2s ease-in-out infinite;
}

.hero-subtitle{
  max-width:470px;
  margin:0 auto 18px;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
  font-weight:600;
}

.brand-logo{
  display:block;
  width:min(100%, 190px);
  max-height:120px;
  object-fit:contain;
  margin:0 auto 12px;
}
html[data-theme="dark"] .brand-logo{
  filter:brightness(1.08) contrast(1.04);
}

.divider-accent{
  width:44px;
  height:3px;
  border-radius:999px;
  background:var(--red);
  margin:8px auto 18px;
}

.links{display:grid;gap:12px}

.availability-pill{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:max-content;
  max-width:100%;
  padding:10px 16px;
  border-radius:999px;
  background:rgba(18,19,24,.92);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  font-size:13px;
  line-height:1;
  font-weight:800;
  box-shadow:0 10px 22px rgba(0,0,0,.18);
}

.availability-dot{
  position:relative;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#25e681;
  box-shadow:0 0 0 5px rgba(37,230,129,.12), 0 0 16px rgba(37,230,129,.7);
}

.availability-dot::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:50%;
  border:1px solid rgba(37,230,129,.45);
  animation:availability-pulse 1.6s ease-out infinite;
}

@keyframes availability-pulse{
  0%{transform:scale(.55);opacity:.9}
  100%{transform:scale(1.8);opacity:0}
}

@keyframes aurora-text-flow{
  0%, 100%{background-position:0% 50%}
  50%{background-position:100% 50%}
}

@keyframes aurora-red-glow{
  0%, 100%{
    filter:drop-shadow(0 0 12px rgba(242,24,40,.16));
  }
  50%{
    filter:drop-shadow(0 0 24px rgba(242,24,40,.36));
  }
}

@keyframes aurora-bg-flow{
  0%, 100%{
    background-position:0% 45%, 0% 50%;
    transform:rotate(-10deg) translate3d(-2%, -1%, 0);
  }
  50%{
    background-position:100% 55%, 80% 50%;
    transform:rotate(-7deg) translate3d(2%, 1%, 0);
  }
}

.link-item{
  min-height:70px;
  display:grid;
  grid-template-columns:48px 1fr 24px;
  gap:14px;
  align-items:center;
  text-decoration:none;
  color:var(--text);
  background:var(--button);
  border:1px solid var(--button-border);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.link-item:hover{
  transform:translateY(-2px);
  border-color:rgba(242,24,40,.30);
  box-shadow:0 16px 30px rgba(242,24,40,.10), var(--shadow-soft);
}

.primary{
  background:linear-gradient(135deg,var(--red),var(--red-dark));
  color:#fff;
  box-shadow:0 18px 30px rgba(242,24,40,.28);
}
html[data-theme="dark"] .primary{
  box-shadow:0 0 22px rgba(242,24,40,.45), 0 10px 20px rgba(0,0,0,.30);
}

.official-link{
  min-height:88px;
  grid-template-columns:1fr 44px;
  gap:16px;
  padding:18px 20px;
  border:none;
  border-radius:20px;
  color:#08090b;
  background:linear-gradient(135deg,#ffc140,#ffe594);
  box-shadow:0 18px 34px rgba(255,193,64,.30);
}

.official-link:hover{
  border-color:transparent;
  box-shadow:0 18px 34px rgba(255,193,64,.38), var(--shadow-soft);
}

html[data-theme="dark"] .official-link{
  box-shadow:0 18px 34px rgba(255,193,64,.18), 0 10px 20px rgba(0,0,0,.30);
}

.official-link .link-copy small{
  margin:0 0 7px;
  color:rgba(8,9,11,.72);
  font-size:12px;
  line-height:1;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.official-link .link-copy strong{
  font-size:20px;
  line-height:1.15;
  color:#000;
}

.arrow-icon{
  width:18px;
  height:18px;
  display:block;
}

.arrow-icon path{
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.external-arrow{
  justify-self:end;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(158,112,0,.18);
  color:#050607;
  line-height:1;
}

.icon-circle{
  width:44px;height:44px;border-radius:50%;
  display:grid;place-items:center;
  overflow:hidden;
  color:#fff;
  flex:none;
}
.icon-circle svg{width:22px;height:22px;fill:currentColor}

.white-red{
  background:#fff;
  color:var(--red);
}
.whatsapp{background:#1db954}
.instagram{
  background:radial-gradient(circle at 30% 107%, #fdf497 0 12%, #fdf497 15%, #fd5949 40%, #d6249f 60%, #285AEB 90%);
}
.facebook{background:#1877f2}
.outlined{
  color:var(--red);
  background:transparent;
  border:1.5px solid rgba(242,24,40,.55);
}

.link-copy strong{
  display:block;
  font-size:16px;
  line-height:1.15;
  letter-spacing:-.01em;
}
.link-copy small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.2;
}
.primary .link-copy small{color:rgba(255,255,255,.75)}
.official-link .link-copy small{color:rgba(8,9,11,.72)}

.link-arrow{
  justify-self:end;
  align-self:center;
  color:#8b8c94;
  line-height:1;
  opacity:.9;
  transition:transform .18s ease, color .18s ease;
}

.link-item:hover .link-arrow{
  color:var(--red);
  transform:translate(2px, -2px);
}

.section-separator{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:8px 0 2px;
}
.section-separator .line{
  width:40%;
  height:1px;
  background:var(--line);
}
.section-separator .dot{
  width:10px;height:10px;border-radius:50%;
  background:var(--red);
  box-shadow:0 0 0 8px var(--card);
}

.benefits{
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
}
.benefit-item{
  display:grid;
  grid-template-columns:40px 1fr;
  align-items:center;
  gap:10px;
  padding:12px 6px;
}
.benefit-item:not(:last-child){border-right:1px solid var(--line)}
.benefit-icon{
  width:40px;height:40px;display:grid;place-items:center;color:var(--red);
}
.benefit-icon svg{width:32px;height:32px;fill:currentColor}
.benefit-item p{
  margin:0;
  font-size:13.5px;
  line-height:1.3;
  color:var(--muted);
  font-weight:700;
}

.footer-box{
  margin-top:20px;
  padding:20px 16px 18px;
  border-radius:28px;
  background:rgba(255,255,255,.36);
  border:1px solid var(--button-border);
  text-align:center;
}
html[data-theme="dark"] .footer-box{
  background:rgba(255,255,255,.02);
}
.quote-mark{
  display:block;
  color:var(--red);
  font-size:42px;
  line-height:.7;
  font-weight:900;
}
.arabic{
  margin:2px 0 0;
  font-size:27px;
  line-height:1.25;
  font-weight:800;
  color:var(--text);
  background:linear-gradient(110deg, var(--red), var(--text), var(--red), var(--red-dark));
  background-size:260% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:aurora-text-flow 5.5s ease-in-out infinite reverse, aurora-red-glow 3.2s ease-in-out infinite;
}
.footer-box small{
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.heart{
  display:block;
  margin-top:10px;
  color:var(--red);
  font-size:24px;
}

@media (max-width: 640px){
  .brand-logo{max-height:90px}
}

@media (prefers-reduced-motion: reduce){
  .hero h1,
  .arabic,
  .page-bg::before,
  .page-bg::after{
    animation:none;
  }
}

@media (max-width: 480px){
  .wrapper{padding:12px 10px}
  .link-card{
    padding:22px 14px 16px;
    border-radius:28px;
  }
  .theme-toggle{
    top:12px;right:12px;padding:8px 12px;
  }
  .brand-logo{
    width:min(100%, 155px);
    margin-top:18px;
    max-height:75px;
  }
  .hero h1{
    margin-top:12px;
    font-size:22px;
  }
  .hero-subtitle{
    font-size:13px;
  }
  .link-item{
    min-height:64px;
    grid-template-columns:42px 1fr 18px;
    gap:10px;
    padding:11px 12px;
    border-radius:16px;
  }
  .official-link{
    min-height:82px;
    grid-template-columns:1fr 42px;
    gap:12px;
    padding:16px 18px;
    border-radius:18px;
  }
  .official-link .link-copy strong{font-size:19px}
  .official-link .link-copy small{font-size:11px}
  .external-arrow{
    width:42px;
    height:42px;
    border-radius:13px;
  }
  .external-arrow .arrow-icon{
    width:17px;
    height:17px;
  }
  .availability-pill{
    padding:9px 13px;
    font-size:12px;
  }
  .icon-circle{
    width:40px;height:40px;
  }
  .icon-circle svg{
    width:20px;height:20px;
  }
  .link-copy strong{font-size:15px}
  .link-copy small{font-size:11px}
  .link-arrow .arrow-icon{width:16px;height:16px}

  .benefits{
    grid-template-columns:1fr;
    gap:2px;
  }
  .benefit-item{
    border-right:none !important;
    border-bottom:1px solid var(--line);
    padding:12px 4px;
  }
  .benefit-item:last-child{border-bottom:none}
  .benefit-item p{font-size:14px}

  .footer-box{
    border-radius:22px;
  }
}
