*{box-sizing:border-box}
:root{
  --bg:#f8fafc; --ink:#0f172a; --muted:#475569;
  --brand:#f59e0b; --brand-ink:#92400e; --card:#fff; --stroke:#e2e8f0;
  --accent:#b45309;
}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:'Tajawal', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif}

.container{max-width:1200px;margin-inline:auto;padding:0 20px}
.topbar{background:#0f172a;color:#e5e7eb;font-size:14px}
.topbar-inner{display:flex;justify-content:space-between;align-items:center;padding:8px 0;gap:12px}
.topbar .link{color:#e5e7eb;text-decoration:none}
.topbar-right{display:none;gap:16px;align-items:center}
@media(min-width:900px){.topbar-right{display:flex}}
/* اجبر التوب بار يشتغل LTR عشان الترتيب يبقى: [يسار=البراند] [يمين=السوشيال] */
.topbar-inner{ direction:ltr; }

/* تنسيق البراند */
.brand{ display:flex; align-items:center; gap:8px; }
.brand-logo{ height:36px; width:auto; border-radius:8px; }

/* أيقونات السوشيال */
.socials{ display:flex; gap:14px; }
.socials svg{ width:26px; height:26px; fill:#fff; transition:fill .2s; }
.socials svg:hover{ fill:#25D366; } /* واتساب أخضر عند الهوفر */


/* Hero */
.hero{background:linear-gradient(180deg,#fff7ed 0%,#ffffff 70%);padding:40px 0 56px}
.hero-grid{display:grid;grid-template-columns:1fr;gap:36px;align-items:center}
@media(min-width:992px){.hero-grid{grid-template-columns:1.05fr 1fr}}
.hero-text .badge{display:inline-block;background:#fff7ed;border:1px solid #fed7aa;color:#92400e;border-radius:999px;padding:6px 12px;font-weight:800}
.hero-text h1 { font-size: 36px; line-height: 1.3; margin: 10px 0 14px; }
@media(min-width:640px){.hero-text h1 { font-size: 36px; line-height: 1.3; margin: 10px 0 14px; }
.btn{display:inline-block;border-radius:18px;padding:12px 18px;font-weight:800;text-decoration:none;border:1px solid transparent;box-shadow:0 2px 6px rgba(0,0,0,.06)}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{filter:brightness(.97)}
.btn-secondary{background:#fff;border:1px solid var(--stroke);color:var(--ink)}
.btn-secondary:hover{box-shadow:0 6px 18px rgba(0,0,0,.06)}
.hint{color:#94a3b8;font-size:13px;margin-top:6px}

.hero-media .media-card{position:relative}
.grid-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;background:#fff;border:1px solid var(--stroke);border-radius:22px;padding:10px;box-shadow:0 12px 32px rgba(0,0,0,.08)}
.grid-gallery.imgs .g{border-radius:14px;height:92px;object-fit:cover;width:100%}
.grid-gallery.imgs .g-span2{grid-column:span 2}
.camera-note{position:absolute;left:-10px;bottom:-12px;background:#fff;border:1px solid var(--stroke);border-radius:16px;padding:8px 12px;box-shadow:0 8px 24px rgba(0,0,0,.1);font-size:13px}

/* Sections */
.section{padding:64px 0}
.section-alt{background:#fff;border-block:1px solid var(--stroke)}

/* Cards */
.cards{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:768px){.cards{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1100px){.cards{grid-template-columns:repeat(4,1fr)}}
.card{background:var(--card);border:1px solid var(--stroke);border-radius:18px;padding:18px;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.card .card-title{font-weight:800;margin-bottom:6px}

/* Programs */
.title{font-size:32px;margin:0 0 18px;font-weight:900}
.programs{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:900px){.programs{grid-template-columns:repeat(2,1fr)}}
.program{background:#fff;border:1px solid var(--stroke);border-radius:18px;padding:18px}
.program h3{margin:0 0 10px;font-size:20px}
.program ul{margin:0 0 10px;padding:0 20px}
.program li{margin:6px 0}
.program .note{color:#92400e;font-weight:800}

/* Why us */
.why-grid{display:grid;grid-template-columns:1fr;gap:24px;align-items:center}
@media(min-width:992px){.why-grid{grid-template-columns:1fr .9fr}}
.ticks{list-style:none;padding:0;margin:8px 0 14px}
.ticks li{position:relative;padding-right:22px;margin:8px 0}
.ticks li::before{content:'✔';position:absolute;right:0;top:0;color:#b45309}
.why-media{background:#fff;border:1px solid var(--stroke);border-radius:18px;min-height:260px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.why-media img{width:100%;height:100%;object-fit:cover;border-radius:16px}

/* FAQ */
.faq details{background:#fff;border:1px solid var(--stroke);border-radius:16px;padding:12px;margin:8px 0}
.faq summary{cursor:pointer;font-weight:800}
.faq p{margin:8px 0 0;color:#475569}

/* Contact */
.contact-grid{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:1000px){.contact-grid{grid-template-columns:1fr 1.2fr}}
.links{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.links a{text-decoration:none;color:var(--ink)}
.map{border:1px solid var(--stroke);border-radius:16px;overflow:hidden;background:#fff;margin-top:10px}
.map-ph{display:flex;align-items:center;justify-content:center;height:240px;background:#fff7ed;color:#b45309;font-size:14px}
.contact-form form{background:#fff;border:1px solid var(--stroke);border-radius:18px;padding:18px;display:grid;gap:12px}
.contact-form input,.contact-form textarea{border:1px solid var(--stroke);border-radius:12px;padding:12px;font-family:inherit}
.tiny{font-size:12px;color:#64748b}

/* Footer */
.footer {
  background:#0f172a;
  color:#fff;
  padding:20px 0;
}
.footer-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px;
}
.footer-links a {
  margin-left:15px;
  color:#fff;
  text-decoration:none;
}
.footer-center {
  text-align:center;
  flex:1;
}
.footer-left {
  text-align:left;
  flex:1;
  margin-right:10px;
}
.footer-logo img {
  height:40px; /* متغيرتش حجم اللوجو */
}

.footer-center {
  flex:1;
  text-align:center;  /* النص في النص */
}


/* Placeholder image polish */
.grid-gallery.imgs .g{border-radius:14px;height:92px;object-fit:cover;width:100%;display:block}
.grid-gallery.imgs .g{filter:saturate(1.05) contrast(1.02)}
.grid-gallery.imgs .g:hover{transform:translateY(-1px);transition:.2s ease;box-shadow:0 6px 16px rgba(0,0,0,.12)}


.hero-main-img{border-radius:22px;max-width:100%;height:auto;display:block;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.topbar-inner{display:flex;justify-content:space-between;align-items:center;padding:8px 20px}
.topbar-inner .brand-name{font-weight:800;font-size:18px;color:#fff}
.topbar-inner .topbar-icons .icon{margin-left:8px;font-size:18px}
.topbar{background:#0f172a;color:#fff}


/* Topbar brand + socials */
.topbar .brand{font-weight:800;letter-spacing:.3px}
.topbar .socials{display:flex;gap:14px;align-items:center}
.topbar .social svg{fill:#e5e7eb;opacity:.9;transition:.2s ease;display:block}
.topbar .social:hover svg{opacity:1;transform:translateY(-1px)}
/* Hero single photo */
.hero-media{position:relative}
.hero-media .hero-photo{width:100%;max-height:460px;object-fit:cover;border-radius:22px;box-shadow:0 12px 32px rgba(0,0,0,.08)}


h1 { text-align: center; }
.accent-green { color: #16a34a; font-weight: 700; } /* green */
.accent-red { color: #dc2626; font-weight: 700; }   /* red */
.accent-blue { color: #2563eb; font-weight: 700; }  /* blue */

.hero-text { text-align:center; }
.pill { background:#fff7ed; border:2px solid #f59e0b; border-radius:999px; padding:6px 14px; color:#b45309; font-weight:600; font-size:14px; }

/* === Fix topbar layout & socials === */
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.socials {
  display: flex;
  gap: 14px;
}
.socials svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  transition: fill 0.2s;
}
.socials svg:hover {
  fill: #25D366;
}

/* === Footer layout (no logo size change) === */
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:16px}
.footer-brand{display:flex;align-items:center;gap:10px;margin-right:auto}
.footer-title{font-weight:700;color:#fff;line-height:1.2}
.footer-subtext{font-size:13px;color:#cbd5e1;text-align:left;line-height:1.4}
.footer-links{display:flex;gap:20px}
.footer-links a{color:#e5e7eb;text-decoration:none}
.footer-links a:hover{text-decoration:underline}
@media (max-width:768px){
  .footer-inner{flex-direction:column;align-items:flex-start}
  .footer-links{flex-wrap:wrap;gap:14px}
}

/* ===== LGN v2 Responsive Enhancements (Unified) ===== */

img, video { max-width: 100%; height: auto; }

@media (max-width: 576px) {
  .container { padding: 0 14px; }

  .hero { padding: 28px 0 40px; }
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 22px; line-height: 1.45; margin: 8px 0 12px; }
  .hero-text .badge, .pill { font-size: 12px; padding: 4px 10px; }

  .btn { width: 100%; text-align: center; font-size: 14px; padding: 10px; }

  .grid-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .grid-gallery.imgs .g { height: 86px; }

  .cards,
  .programs,
  .why-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .topbar-inner { padding: 8px 12px; gap: 10px; }
  .brand-logo { height: 30px; }
  .topbar-right { display: none !important; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-left, .footer-center { text-align: center; margin-right: 0; }
}

@media (min-width: 577px) and (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero-text h1 { font-size: 26px; }
  .grid-gallery { grid-template-columns: 1fr 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .programs { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 991px) {
  .container { padding: 0 18px; }
  .hero-text h1 { font-size: 30px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .programs { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}

/* ===== LGN v3 Mobile Fixes ===== */

/* Prevent horizontal scroll on small screens */
html, body { overflow-x: hidden; }

/* Force full-width layout on phones and ensure single-column grids */
@media (max-width: 576px) {
  .container { max-width: 100% !important; width: 100% !important; padding: 0 14px; }

  .hero, .section, .footer { padding-left: 0; padding-right: 0; }

  .hero-grid, .why-grid, .contact-grid { grid-template-columns: 1fr !important; }

  .programs, .cards { grid-template-columns: 1fr !important; }

  /* Typography polish */
  .hero-text { text-align: center; }
  .hero-text h1 { margin-top: 10px; margin-bottom: 12px; }

  /* Make lists and paragraphs easier to read */
  .program li, .ticks li, .faq p { line-height: 1.7; }

  /* Ensure media and cards stretch properly */
  .why-media, .card, .program, .contact-form form { width: 100%; }
}

/* ===== LGN v4 Wider Mobile/Tablet Fixes ===== */

/* Make all embeds fluid */
iframe, embed, object, video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
}

/* Common two-column wrappers forced to single column */
.row, .columns, .two-col, .col, .content-grid, .hero-grid, .why-grid, .contact-grid, .programs, .cards {
  box-sizing: border-box;
}

/* Stack columns up to 1024px to avoid narrow right gutter */
@media (max-width: 1024px) {
  .container { max-width: 100% !important; width: 100% !important; padding: 0 16px; }

  .row, .columns, .two-col, .content-grid {
    display: block !important;
  }

  /* Force grid-based sections to single column */
  .hero-grid, .why-grid, .contact-grid, .programs, .cards {
    grid-template-columns: 1fr !important;
  }

  /* Neutralize floats and fixed widths if present */
  .left, .right, .sidebar, .content, [class*="col-"] {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tighter typographic measure for readability */
  .section p, .section li {
    line-height: 1.8;
  }

  /* Video wrapper (if any) */
  .video, .video-wrap, .hero-media, .why-media {
    width: 100% !important;
  }

  /* Map block */
  .map, .map iframe {
    width: 100% !important;
  }
}

/* Cap large images (e.g., logo at the bottom) */
img.responsive, .hero-photo, .hero-main-img, .footer-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}
