/* ============================================================
   layout.css — Cricket Universe
   Improved: modern spacing, clean grid, full responsiveness
   ============================================================ */

/* ─────────────────────────────────────────
   1. CONTAINER
───────────────────────────────────────── */

/* ✅ IMPROVED: Added padding so content never touches screen edges */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─────────────────────────────────────────
   2. TWO-COLUMN LAYOUT
───────────────────────────────────────── */

/* ✅ IMPROVED: Wider gap + better alignment */
.two-column {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.two-column img {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ✅ NEW: Text side of two-column layout */
.two-column-text {
  flex: 1;
  min-width: 260px;
  max-width: 520px;
}

.two-column-text h2 {
  font-size: clamp(18px, 2.8vw, 24px);
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 14px;
}

.two-column-text p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.75;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────
   3. PROFILE SECTION
───────────────────────────────────────── */

/* ✅ IMPROVED: More breathing room on desktop */
.profile {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 30px 40px;
  text-align: center;
}

/* ✅ NEW: Profile headings */
.profile h1 {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 14px;
  line-height: 1.2;
}

.profile h2 {
  font-size: clamp(17px, 2.8vw, 22px);
  font-weight: 700;
  color: #f97316;
  margin: 36px 0 14px;
}

.profile > p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.75;
  max-width: 720px;
  margin: 0 auto 16px;
}

/* ─────────────────────────────────────────
   4. SECTION SPACING HELPERS
───────────────────────────────────────── */

/* ✅ NEW: Utility classes for consistent vertical rhythm */
.section-gap {
  margin-bottom: 60px;
}

.section-gap-sm {
  margin-bottom: 32px;
}

/* ✅ NEW: Horizontal padding wrapper for full-width sections */
.section-pad {
  padding: 70px 40px;
}

/* ─────────────────────────────────────────
   5. TABLE
───────────────────────────────────────── */

/* ✅ IMPROVED: Rounded wrapper, better padding, softer borders */
.table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

table th,
table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 18px;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
}

/* ✅ IMPROVED: Richer header background */
table th {
  background: #0f2a5c;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 13px;
  text-transform: uppercase;
}

table td {
  color: #cbd5e1;
}

table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

/* ─────────────────────────────────────────
   6. GALLERY GRID
───────────────────────────────────────── */

/* ✅ IMPROVED: Consistent gap + auto-fit columns */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

/* ─────────────────────────────────────────
   7. CARDS GRID (features + stats)
───────────────────────────────────────── */

/* ✅ IMPROVED: Slightly larger min column, consistent gap */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 80px 40px;
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

/* ─────────────────────────────────────────
   8. LIVE SECTION
───────────────────────────────────────── */

/* ✅ IMPROVED: Center + comfortable max-width */
.live-box {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 36px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.85;
}

.live-indicator {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ─────────────────────────────────────────
   9. ARCHITECTURE FLOW (about-project.html)
───────────────────────────────────────── */

/* ✅ IMPROVED: Better wrapping and spacing */
.about-arch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 36px 24px;
  border-radius: 16px;
  margin-bottom: 28px;
  text-align: center;
}

.arch-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
}

.arch-step span {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.arch-arrow {
  font-size: 20px;
  color: #f97316;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1;
}

/* ─────────────────────────────────────────
   10. FOOTER LAYOUT
───────────────────────────────────────── */

/* ✅ IMPROVED: More padding + consistent gap */
.footer-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 40px 40px 20px;
  gap: 40px;
}

.footer-section {
  min-width: 160px;
  max-width: 260px;
  flex: 1;
}

/* ─────────────────────────────────────────
   11. UTILITY CLASSES
───────────────────────────────────────── */

/* ✅ NEW: Text alignment helpers */
.text-center { text-align: center; }
.text-left   { text-align: left; }

/* ✅ NEW: Flex centering helper */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ✅ NEW: Full-width image reset */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─────────────────────────────────────────
   12. TABLET — max 900px
───────────────────────────────────────── */

@media (max-width: 900px) {

  /* ✅ IMPROVED: Tighter section padding on tablet */
  .features   { padding: 60px 20px 40px; }
  .section-pad { padding: 50px 24px; }
  .profile    { padding: 40px 20px; }

  .footer-container { padding: 30px 24px; gap: 30px; }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
  }

  .gallery img { height: 180px; }

  .two-column { gap: 28px; }
}

/* ─────────────────────────────────────────
   13. MOBILE — max 768px
───────────────────────────────────────── */

@media (max-width: 768px) {

  /* ✅ IMPROVED: Stack two-column layout */
  .two-column {
    flex-direction: column;
    gap: 20px;
  }

  .two-column img  { width: 100%; }
  .two-column-text { max-width: 100%; }

  /* ✅ IMPROVED: Single column feature cards */
  .features {
    grid-template-columns: 1fr;
    padding: 60px 15px 30px;
    gap: 18px;
  }

  /* ✅ IMPROVED: 2-column stat grid on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* ✅ IMPROVED: Compact profile */
  .profile { padding: 30px 15px; }

  /* ✅ IMPROVED: Compact section blocks */
  .section-block  { padding: 22px 16px; }
  .section-pad    { padding: 40px 15px; }
  .section-gap    { margin-bottom: 40px; }

  /* ✅ IMPROVED: 2-column gallery on mobile */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery img { height: 150px; }

  /* ✅ IMPROVED: Smaller table text */
  table th, table td {
    padding: 9px 10px;
    font-size: 13px;
  }

  /* ✅ IMPROVED: Live box padding */
  .live-box { padding: 20px 16px; }

  /* ✅ IMPROVED: Stack footer */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    gap: 24px;
  }

  .footer-section         { max-width: 100%; }
  .footer-section a:hover { padding-left: 0; }

  /* ✅ IMPROVED: Architecture flow stacks on mobile */
  .about-arch  { gap: 4px; padding: 22px 10px; }
  .arch-step   { min-width: 52px; font-size: 22px; }
  .arch-arrow  { font-size: 16px; margin-bottom: 12px; }

  /* ✅ IMPROVED: Profile intro stacks on mobile */
  .profile-intro {
    flex-direction: column;
    padding: 22px 16px;
    gap: 20px;
  }

  .profile-hero-img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* ─────────────────────────────────────────
   14. SMALL MOBILE — max 480px
───────────────────────────────────────── */

@media (max-width: 480px) {

  /* ✅ IMPROVED: 2-col gallery stays readable */
  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .gallery img { height: 120px; border-radius: 10px; }

  /* ✅ IMPROVED: Stats always 2 columns */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* ✅ NEW: Architecture flow stacks into single column */
  .about-arch    { flex-direction: column; }
  .arch-arrow    { transform: rotate(90deg); margin: 0; }

  /* ✅ IMPROVED: Table scroll hint */
  .table-wrapper { border-radius: 10px; }

  table th, table td {
    padding: 8px;
    font-size: 12px;
  }
}
