/* kareemsulthan.com — static copy of the home page (originally built on Wix).
   Desktop layout matches the original; narrow screens get a simple stacked layout. */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-width: 980px;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  overflow-y: scroll;
}

.site-header { height: 54px; }
.site-footer { height: 40px; }

/* ---- Page column (980px, centred) ---- */
.cards {
  width: 980px;
  margin: 0 auto;
  padding: 3px 0 58px;
}

/* ---- Inner pages (e.g. My Gaming PC Specs) ---- */
.page {
  width: 980px;
  margin: 0 auto;
}

.specs {
  width: 596px;
  min-height: 352px;
  margin-left: 215px;
  font-size: 13px;
  line-height: 1.4em;
}
.specs p { margin: 0; }

.page-heading {
  width: 596px;
  min-height: 15px;
  margin: 7px 0 7px 215px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4em;
}

.page-apps {
  min-height: 1025px;
  padding: 1px 0 10px;
}
.page-apps .card { --x: 215px; }

/* ---- Text pages (contact, privacy policies) ---- */
.doc {
  width: 596px;
  margin: 7px 0 40px 215px;
  font-size: 13px;
  line-height: 1.4em;
}
.doc h1 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4em;
}
.doc p { margin: 0 0 14px; }
.doc a { color: #f00; text-decoration: underline; }

/* Centered variant (contact page) */
.doc--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- App card ---- */
.card {
  --x: 216px;          /* left offset inside the 980px column */
  --ix: 5px;           /* icon left offset */
  --tx: 75px;          /* text left offset */
  --icon-gap: 10px;    /* space below the icon */
  --title-gap: 1px;    /* space below the title */
  --desc-gap: 3px;     /* space below the description */
  --desc-min: 64px;    /* min height of the description */

  display: grid;
  grid-template-columns: 596px;
  grid-template-rows: min-content min-content 1fr;
  width: 596px;
  margin-left: var(--x);
}
.card--short { grid-template-rows: min-content 1fr; }

.card > *,
.text > * {
  position: relative;
  justify-self: start;
  align-self: start;
}

.text { display: contents; }

.icon {
  grid-area: 1 / 1 / 4 / 2;
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  left: var(--ix);
  margin: 10px 0 var(--icon-gap);
}
.card--short .icon { grid-area: 1 / 1 / 2 / 2; }

.title {
  grid-area: 1 / 1 / 2 / 2;
  width: 514px;
  left: var(--tx);
  margin: 10px 0 var(--title-gap);
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4em;
}

.desc {
  grid-area: 2 / 1 / 3 / 2;
  width: 514px;
  left: var(--tx);
  min-height: var(--desc-min);
  margin: 0 0 var(--desc-gap);
  font-size: 13px;
  line-height: 1.4em;
}

.desc p { margin: 0; }
.desc ul { margin: 0 0 0 .5em; padding: 0; list-style: disc; }
.desc li { margin: 0 0 0 1.3em; }

.desc a { color: #f00; text-decoration: underline; }

/* ---- Narrow screens: stack into a single readable column ---- */
@media (max-width: 979px) {
  body { min-width: 0; }

  .cards { width: auto; padding: 3px 16px 40px; }

  .page { width: auto; padding: 0 16px; }
  .specs,
  .page-heading { width: auto; min-height: 0; margin-left: 0; overflow-wrap: anywhere; }
  .page-apps { min-height: 0; padding: 1px 0 40px; }
  .doc { width: auto; margin-left: 0; overflow-wrap: anywhere; }

  .card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0 0 16px;
  }
  .card > *, .text > * { position: static; }

  .icon { flex: none; margin: 10px 0 0; }

  .text { display: block; flex: 1 1 auto; min-width: 0; }
  .title { width: auto; margin: 10px 0 1px; overflow-wrap: anywhere; }
  .desc  { width: auto; min-height: 0; margin: 0; overflow-wrap: anywhere; }
}
