/* ============================================================
   THEME.CSS - Complete Theme for Omar-Type Foundry
   Includes: Global styles, variables, fonts, header, footer
   ============================================================ */

/* ============================================================
   PART 1: FONTS & IMPORTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

@font-face {
    font-family: "Droid Arabic Naskh";
    src: url("../fonts/DroidNaskh-Regular.woff2") format("woff2"),
         url("../fonts/DroidNaskh-Regular.woff") format("woff"),
         url("../fonts/DroidNaskh-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

/* ============================================================
   PART 2: RESET & BASE STYLES
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

:root {  
  --back: #0A3444;
  --back-drk: #062D3D;
  --text: #a79775;  
  --gold: #87754F;  
  --white: white;
}

html {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--back);
  color: var(--text);
  font-size: 62.5%;    /* it is 10px */
  -webkit-text-size-adjust: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-size: 1.6rem;
}

a:visited {
  color: inherit;
}

.container {
  max-width: 95%;
  min-width: 300px;
  margin: auto;
}

/* ============================================================
   PART 3: UNIFIED BUTTON STYLE (Single button for all uses)
   ============================================================ */

button {
  background: transparent;
  border: 2px solid var(--gold);
  position: relative;
  display: inline-block;
  padding: 0.5em 1em;
  transition: all 0.3s ease-in-out;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  font-size: 1.6rem;
}

button::before,
button::after {
  content: '';
  display: block;
  position: absolute;
  border-color: var(--gold);
  box-sizing: border-box;
  border-style: solid;
  width: 1em;
  height: 1em;
  transition: all 0.3s ease-in-out;
}

button::before {
  top: -6px;
  left: -6px;
  border-width: 2px 0 0 2px;
  z-index: 5;
}

button::after {
  bottom: -6px;
  right: -6px;
  border-width: 0 2px 2px 0;
}

button:hover::before,
button:hover::after,
button:focus::before,
button:focus::after,
button:active::before,
button:active::after {
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border-color: var(--gold);
}

button:hover,
button:focus,
button:active {
  color: var(--white);
  background-color: var(--gold);
  border-color: var(--gold);
}

/* ============================================================
   PART 4: HEADER SECTION
   ============================================================ */

/* ----- Basmala, Phone, Arabic Language Toggle ----- */

.section {
  display: flex;
  margin: 1rem auto;
  justify-content: space-between;
}

.basmalah {
  width: 27%;
  min-width: 250px;
  order: 2;
  margin: auto;
}

.phone {
  font-size: 1.4rem;
  justify-self: right;
  align-self: center;
  order: 1;
  padding-left: 7px; 
}

.arabic-lang {
  justify-self: right;
  align-self: center;
  order: 3;
  display: block;
  width: 129px;
  height: 27px;
}

.arabic-lang img {
  width: 68px;
  height: 27px;
  margin-left: 60px;
  transition: all 0.3s ease-in-out;
}

.arabic-lang img:hover,
.arabic-lang img:focus,
.arabic-lang img:active {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

/* ----- Navbar ----- */

.navbar input[type="checkbox"],
.navbar .lines {
  display: none;
  position: absolute;
  left: -20px;
}

.navbar {
  width: 95%;
  margin: auto;
  background: var(--back);
}

.box1 {
  display: flex;
  width: 100%;
  justify-content: space-between;
  height: 50px;
  align-items: center;
}

.logo {
  order: 1;
  font-size: 3rem;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, .6);
}

.logo a {
  text-decoration: none;
  color: var(--white);
}

.menu {
  order: 2;
  display: flex;
}

.menu li a:visited,
.menu li a:link {
  list-style: none;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--white);
  padding: 1rem 1.5rem;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, .6);
}

.menu li {
  margin-left: 1rem;
  background-color: var(--gold);
  overflow: hidden;
  padding: 10px 0px;
  border-radius: 2rem;
  cursor: pointer;
  transition: transform 600ms cubic-bezier(.33, .11, .02, .99);
}

.menu li:hover,
.menu li:focus {
  box-shadow: 0 4px 4px rgba(0, 0, 0, .1),
              0 1px 6px rgba(0, 0, 0, .05),
              0 8px 8px rgba(0, 0, 0, .1),
              0 16px 16px rgba(0, 0, 0, .1),
              8px 32px 32px rgba(0, 0, 0, .15),
              8px 64px 64px rgba(0, 0, 0, .15);
  transform: scale(1.05) translateY(-0.5rem);
}

.menu li:active {
  box-shadow: 0 4px 4px rgba(0, 0, 0, .1),
              0 1px 6px rgba(0, 0, 0, .05),
              0 8px 8px rgba(0, 0, 0, .1),
              0 16px 16px rgba(0, 0, 0, .1),
              8px 16px 16px rgba(0, 0, 0, .15),
              8px 32px 32px rgba(0, 0, 0, .15);
}

/* ============================================================
   PART 5: HEADER MEDIA QUERIES
   ============================================================ */

@media (max-width: 1150px) {
  .navbar {
    width: 99%;
  }
}

@media (min-width: 1030px) and (max-width: 1100px) {
  .menu li a:link {
    font-size: 1.5rem;
  }
  .menu li {
    margin-left: .5rem;
  }
}

@media (max-width: 1040px) {
  .navbar {
    width: 100%;
  }
  
  .box1 input[type="checkbox"],
  .box1 .lines {
    position: relative;
    display: block;
    left: 20px;
  }
  
  .box1 {
    display: block;
    position: relative;
  }
  
  .box1 input[type="checkbox"] {
    position: absolute;
    display: block;
    height: 40px;
    width: 50px;
    top: 5px;
    left: 15px;
    z-index: 55;
    cursor: pointer;
    opacity: 0;
  }

  .lines {
    height: 40px;
    width: 50px;
    top: 5px;
    z-index: 54;
    position: absolute;
    display: flex;
    flex-direction: column;
  }

  .lines .line {
    margin: 7px 0px;
    display: block;
    position: relative;
    width: 100%;
    height: 5px;
    border-radius: 2rem;
    background: var(--white) !important;
    filter: drop-shadow(1px 1px 1px #000);
  }

  @media (prefers-color-scheme: dark) {
    .lines .line {
      background: var(--white) !important;
      border: 1px solid var(--white) !important;
    }
  }

  .line1 {
    margin-top: 4px;
    transform-origin: 0% 45%;
    transition: transform 0.4s ease-in-out;
  }
  .line2 {
    transition: all 0.4s ease-in-out;
  }
  .line3 {
    transform-origin: 20% 200%;
    transition: transform 0.4s ease-in-out;
  }

  .menu {
    position: relative;
    padding-top: 20px;
    padding-bottom: 5px;
    background: var(--back);
    height: 40rem;
    max-width: 35rem;
    transform: translateX(-150%);
    display: flex;
    flex-direction: column;
    top: -20px;
    z-index: 4;
    margin-top: 2.5rem;
    margin-left: -50px;
    padding-left: 50px;
    transition: transform 0.6s ease-in-out;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, .4);
  }
  
  .menu li {
    position: relative;
    margin-bottom: 1.3rem;
    align-self: flex-start;
    width: 90%;
    padding-top: 13px;
    padding-bottom: 13px;
    font-size: 1.8rem;
    margin-left: 1.5rem;
    border-radius: 5px;
    font-weight: 500;
  }

  .menu li a:link {
    display: block;
    position: absolute;
    left: 30px;
    bottom: 3px;
    width: 100%;
  }

  .logo {
    position: absolute;
    top: 5px;
    right: 10px;
  }

  input[type="checkbox"]:checked ~ .menu {
    transform: translateX(0);
  }

  input[type="checkbox"]:checked ~ .lines .line1 {
    transform: rotate(40deg);
  }
  input[type="checkbox"]:checked ~ .lines .line2 {
    background: var(--back);
    opacity: 0;
  }
  input[type="checkbox"]:checked ~ .lines .line3 {
    transform: rotate(-40deg);
  }
}

@media (min-width: 901px) {
  .navbar {
    margin-bottom: 5rem;
  }
}

@media (max-width: 580px) {
  .logo {
    top: -5px;
  }
  
  .section {
    display: block;
  }
  
  .basmalah {
    position: relative;
    margin-top: 35px;
  }
  
  .phone {
    position: absolute;
    top: 13px;
    width: 129px;
    font-size: 1.3rem;
  }
  
  .arabic-lang {
    position: absolute;
    top: 10px;
    right: 13px;
  }
}

/* ============================================================
   PART 6: FOOTER SECTION
   ============================================================ */

button1 {
  display: block;
  position: relative;
  cursor: pointer;
  text-align: center;
  line-height: 2.1rem;
}

button1 span {
  display: block;
  padding: 6px 10px;
}

button1::before,
button1::after {
  content: "";
  width: 0;
  height: 2px;
  position: absolute;
  transition: all 0.3s linear;
  background: var(--gold);
}

button1 span::before,
button1 span::after {
  content: "";
  width: 2px;
  height: 0;
  position: absolute;
  transition: all 0.3s linear;
  background: var(--gold);
}

button1:hover::before,
button1:hover::after,
button1:focus::before,
button1:focus::after,
button1:active::before,
button1:active::after {
  width: 100%;
}

button1:hover span::before,
button1:hover span::after,
button1:focus span::before,
button1:focus span::after,
button1:active span::before,
button1:active span::after {
  height: 100%;
}

.btn-2::before {
  left: 50%;
  top: 0;
  transition-duration: 0.3s;
}

.btn-2::after {
  left: 50%;
  bottom: 0;
  transition-duration: 0.3s;
}

.btn-2 span::before {
  left: 0;
  top: 50%;
  transition-duration: 0.3s;
}

.btn-2 span::after {
  right: 0;
  top: 50%;
  transition-duration: 0.3s;
}

.btn-2:hover::before,
.btn-2:hover::after,
.btn-2:focus::before,
.btn-2:focus::after,
.btn-2:active::before,
.btn-2:active::after {
  left: 0;
}

.btn-2:hover span::before,
.btn-2:hover span::after,
.btn-2:focus span::before,
.btn-2:focus span::after,
.btn-2:active span::before,
.btn-2:active span::after {
  top: 0;
}

footer {
  min-height: 120px;
  margin-top: 4rem;
  padding-top: 1rem;
}

.pg-footer {
  display: block;
  width: 90%;
  margin: auto;
}

/* Footer links - flexible container */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  row-gap: 0.75rem;
}

/* Button width classes */
.width1 { width: 76px; }      /* Buy Font */
.width2 { width: 104px; }     /* Font License */
.width3 { width: 60px; }      /* FAQs btn */
.width4 { width: 110px; }     /* Privacy Policy */
.width5 { width: 108px; }     /* Return Policy */
.width6 { width: 132px; }     /* Cancellation Policy */
.width7 { width: 91px; }      /* Contact Us */
.width8 { width: 60px; }      /* Home btn */

@media (max-width: 899px) {
  .width1, .width2, .width3, .width4, .width5, .width6, .width7, .width8 {
    width: auto;
  }
}

/* Ensure buttons don't wrap text inside */
.footer-links button1 {
  white-space: nowrap;
}

.footer-links li {
  padding: 0.8rem 0.5rem;
  display: inline-block;
  list-style: none;
}

.footer-links a:link,
.footer-links a:visited {
  text-decoration: none;
  color: var(--text);
}

.footer-social {
  margin: 1rem auto;
  text-align: center;
}

.footer-social h4 {
  margin-bottom: 1rem;
}

.footer-back-to-top {
  text-align: center;
}

.copyright {
  font-size: 1.3rem;
  line-height: 2rem;
  padding-top: 2rem;
  text-align: center;
}

.social-icon-fb,
.social-icon-twitter {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  display: inline-block;
}

.social-icon-fb {
  background: url('../images/social-icon-fb_Arabic_Font.svg') no-repeat;
  margin-right: 1.5rem;
}

a:hover .social-icon-fb,
a:focus .social-icon-fb,
a:active .social-icon-fb {
  background: url('../images/social-icon-fb-over_Arabic_Font.svg') no-repeat;
}

.social-icon-twitter {
  background: url('../images/social-icon-twitter_Arabic_Font.svg') no-repeat;
}

a:hover .social-icon-twitter,
a:focus .social-icon-twitter,
a:active .social-icon-twitter {
  background: url('../images/social-icon-twitter-over_Arabic_Font.svg') no-repeat;
}

/* ============================================================
   PART 7: FOOTER MEDIA QUERIES
   ============================================================ */

/* ULTRA WIDE SCREENS (1400px and above) - perfect single line */
@media (min-width: 1400px) {
  .pg-footer {
    width: 80%;
  }
  .footer-links {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0;
  }
  .footer-links li {
    padding: 0.8rem 0.3rem;
  }
  .footer-links button1 span {
    font-size: 1.4rem;
    padding: 6px 8px;
  }
}

/* LARGE SCREENS (1100px to 1399px) - single line with adjusted widths */
@media (min-width: 1100px) and (max-width: 1399px) {
  .pg-footer {
    width: 95%;
  }
  .footer-links {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0;
  }
  .footer-links li {
    padding: 0.8rem 0.2rem;
  }
  .footer-links button1 span {
    font-size: 1.3rem;
    padding: 5px 6px;
  }
}

/* MEDIUM LARGE SCREENS (900px to 1099px) - try to keep single line */
@media (min-width: 900px) and (max-width: 1099px) {
  .pg-footer {
    width: 98%;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem;
  }
  .footer-links li {
    padding: 0.6rem 0.25rem;
  }
  .footer-links button1 span {
    font-size: 1.25rem;
    padding: 5px 5px;
  }
}

/* TABLET SCREENS (581px to 899px) - wrap allowed, 2-3 rows */
@media (min-width: 581px) and (max-width: 899px) {
  .pg-footer {
    width: 98%;
  }
  .footer-links {
    justify-content: center;
    gap: 0.5rem;
  }
  .footer-links li {
    padding: 0.5rem 0.4rem;
  }
  .footer-links button1 span {
    padding: 5px 12px;
    font-size: 1.35rem;
  }
}

/* MOBILE LANDSCAPE & SMALL TABLET (480px to 580px) */
@media (min-width: 480px) and (max-width: 580px) {
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
  }
  .footer-links li {
    padding: 0.3rem 0.4rem;
  }
  .footer-links button1 span {
    padding: 6px 14px;
    font-size: 1.4rem;
  }
  .footer-social h4 {
    font-size: 1.5rem;
  }
  .social-icon-fb,
  .social-icon-twitter {
    width: 44px;
    height: 44px;
  }
}

/* MOBILE PORTRAIT (up to 479px) - vertical stacking for easy tapping */
@media (max-width: 479px) {
  .pg-footer {
    width: 100%;
  }
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .footer-links li {
    padding: 0.25rem;
    width: auto;
  }
  .footer-links button1 span {
    padding: 8px 20px;
    font-size: 1.5rem;
  }
  .footer-social h4 {
    font-size: 1.4rem;
  }
  .social-icon-fb,
  .social-icon-twitter {
    width: 48px;
    height: 48px;
  }
  .copyright {
    font-size: 1.2rem;
    padding-top: 1.5rem;
  }
}

/* Keep existing responsive behavior for very small devices */
@media (max-width: 580px) {
  .pg-footer {
    width: 100%;
  }
}

/* Ensure the footer-links li elements don't break existing styles */
.footer-links li {
  list-style: none;
}

/* ============================================================
   END OF THEME.CSS
   ============================================================ */