/* ===========================
   RESET & BASE
=========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: #ffffff; color: #000000; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ===========================
   HERO SECTION
=========================== */
.emag-hero {
    background: url('images/Magz3.jpg') center/cover no-repeat;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: #ffffff;
}

.emag-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.hero-logo {
    margin-bottom: 1rem;
    z-index: 2;
    animation: fadeInDown 1s ease forwards;
}

.hero-logo img {
    width: 120px;
    border-radius: 12px;
    border: 2px solid #FFD700;
}

.emag-hero .hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease forwards;
}

.emag-hero h1 {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.emag-hero p {
    font-size: 1.2rem;
    max-width: 600px;
}


/* ===========================
   CATEGORIES
=========================== */
.emag-categories {
    padding: 3rem 1rem;
    text-align: center;
}

.emag-categories .section-title {
    color: #FFD700;
    margin-bottom: 2rem;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.category-item {
    padding: 0.6rem 1.2rem;
    border: 2px solid #000000;
    border-radius: 20px;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.category-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.category-item:hover {
    background: #FFD700;
    color: #000000;
}

/* ===========================
   SUBSCRIBE SECTION
=========================== */
.emag-subscribe {
    padding: 4rem 1rem;
    text-align: center;
    background: #ffffff;
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
}

.emag-subscribe h2 {
    font-size: 2rem;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.emag-subscribe p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #000000;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subscribe-form input {
    padding: 0.7rem 1rem;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 250px;
}

.subscribe-form button {
    padding: 0.7rem 1.5rem;
    background: #FFD700;
    color: #000000;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.subscribe-form button:hover {
    background: #e6c200;
}

/* ===========================
   MODALS
=========================== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: none; justify-content: center; align-items: center; z-index: 999; }
.modal.active { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-content { position: relative; background: #ffffff; padding: 2rem; border-radius: 12px; max-width: 600px; width: 90%; z-index: 2; animation: scaleIn 0.4s ease forwards; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; color: #000000; background: transparent; cursor: pointer; }
.modal-action { margin-top: 1rem; padding: 0.5rem 1.2rem; background: #FFD700; color: #000000; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.modal-action:hover { background: #e6c200; }

/* ===========================
   BUY NOW BUTTONS
=========================== */
.buy-btn {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    background: #FFD700;
    color: #000000;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.buy-btn:hover {
    background: #e6c200;
}

/* ===========================
   BUY MODAL
=========================== */
#buyModal .modal-content { max-width: 500px; padding: 2rem; }
#buyModal form { display: flex; flex-direction: column; gap: 0.8rem; }
#buyModal form input { padding: 0.6rem 1rem; border: 2px solid #000000; border-radius: 6px; font-size: 1rem; }
#buyModal form input[readonly] { background: #f7f5f0; cursor: not-allowed; }
#buyModal form button { padding: 0.7rem 1.5rem; background: #FFD700; color: #000000; border-radius: 6px; font-weight: 600; transition: background 0.3s; }
#buyModal form button:hover { background: #e6c200; }







.back-btn {
  position: fixed;
  top: 35%; /* position on screen */
  left: -70px; /* start hidden off-screen */
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05); /* very transparent */
  backdrop-filter: blur(6px); /* subtle glass blur */
  -webkit-backdrop-filter: blur(6px);
  color: #FFD700; /* gold arrow */
  font-size: 22px;
  text-decoration: none;
  width: 60px;
  height: 70px; /* taller to fit text */
  border-radius: 15px; /* softer corners */
  display: flex;
  flex-direction: column; /* stack text above icon */
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* softer shadow */
  border: 1px solid rgba(255, 255, 255, 0.15); /* faint border */
  z-index: 9999;
  opacity: 0;
  animation: slideIn 0.8s ease forwards;
}

.back-btn .back-text {
  font-size: 12px;
  color: #fff; /* keep text white for readability */
  margin-bottom: 4px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.12); /* slightly stronger on hover */
  transform: translateY(-50%) scale(1.1);
}

@keyframes slideIn {
  0% {
    left: -70px;
    opacity: 0;
  }
  100% {
    left: 15px;
    opacity: 1;
  }
}










/* ===========================
   FOOTER (COMPACT SAME FOR ALL SCREENS)
=========================== */
footer {
  background-color: #FFD700;
  color: #111;
  padding: 12px 10px; 
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px; 
  position: relative;
  overflow: hidden;
}

/* Footer Grid */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px; 
  margin-bottom: 8px; 
  padding-bottom: 10px;
  position: relative;
}

/* Sleek black divider below grid with pointed ends */
.footer-grid::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.8) 10%,
    rgba(0,0,0,1) 50%,
    rgba(0,0,0,0.8) 90%,
    rgba(0,0,0,0) 100%
  );
  opacity: 1;
}

/* Newsletter Section */
.footer-col.newsletter {
  flex: 1 1 220px;
  min-width: 140px;
  margin: 4px 0; 
  text-align: left;
  padding-bottom: 12px;
  position: relative;
}

/* Sleek black divider below newsletter with pointed ends */
.footer-col.newsletter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.8) 10%,
    rgba(0,0,0,1) 50%,
    rgba(0,0,0,0.8) 90%,
    rgba(0,0,0,0) 100%
  );
  opacity: 1;
}

/* Headings & text */
.footer-col h4 {
  font-size: 16px; 
  margin-bottom: 6px;
  color: #111; 
}

.footer-col p,
.footer-col ul li a {
  font-size: 14px; 
  line-height: 1.6; 
  color: #111; 
  margin-bottom: 6px; 
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 4px; 
}

.footer-col ul li a {
  text-decoration: none;
  color: #111; 
}

/* Explore + Contact wrapper */
.explore-contact-wrapper {
  display: flex;
  gap: 8px; 
  flex: 1 1 380px;
  flex-wrap: wrap; 
  margin: 4px 0; 
}

.explore-contact-wrapper .footer-col {
  flex: 1 1 48%;
  min-width: 140px;
}

/* Newsletter form default (mobile) */
.footer-col.newsletter form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.footer-col.newsletter input {
  width: 100%;
  padding: 10px 12px; 
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px; 
  box-sizing: border-box;
  outline: none;
  text-align: left; 
  color: #111;
}

.footer-col.newsletter button {
  width: 100%;
  padding: 10px 0;
  background-color: #111;
  color: #FFD700;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px; 
  transition: background 0.3s, color 0.3s;
  text-align: center;
}

.footer-col.newsletter button:hover {
  background-color: #fff;
  color: #111;
}

/* ===========================
   FOOTER BOTTOM
=========================== */
.footer-bottom {
  display: flex;
  flex-direction: column; 
  justify-content: center;
  align-items: center;
  gap: 10px; 
  padding-top: 10px;
  margin-top: 12px;
  text-align: center; 
  position: relative;
}

/* No extra shimmer at end */
.footer-bottom::before {
  display: none;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px; 
  color: #111;
}

.social-icons {
  display: flex;
  gap: 10px; 
  justify-content: center; 
}

.social-icons a {
  color: #111; 
  font-size: 20px; 
  padding: 6px; 
  border-radius: 50%;
  transition: background 0.3s, color 0.3s;
}

.social-icons a:hover {
  background-color: #fff;
  color: #111;
}

/* ===========================
   FOOTER POPUP MODAL
=========================== */
.footer-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.footer-popup.show {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.footer-popup-content {
  background: #fff; 
  padding: 18px 16px; 
  width: 90%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  position: relative;
  text-align: left;
  line-height: 1.6;
  color: #111; 
}

.footer-popup-content h2 {
  margin-bottom: 8px;
  font-size: 20px; 
  color: #FFD700;
}

.footer-popup-content p {
  margin-bottom: 8px;
  font-size: 15px; 
  color: #111; 
}

.close-footer-popup {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 22px; 
  font-weight: bold;
  color: #111; 
  cursor: pointer;
}

.close-footer-popup:hover { color: #FFD700; }

/* Animations */
@keyframes fadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}

/* ===========================
   MOBILE RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .footer-grid,
  .explore-contact-wrapper,
  .footer-counters,
  .footer-bottom {
    flex-direction: initial !important; 
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .explore-contact-wrapper .footer-col {
    flex: 1 1 48% !important; 
  }

  .footer-counters .counter {
    flex: 1 1 calc(45% - 10px) !important;
  }

  .footer-col.newsletter {
    text-align: left;  
  }

  .footer-col.newsletter form { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 6px; 
    width: 100%;
  }

  .footer-col.newsletter input {
    width: 100%; 
    height: 36px;      
    text-align: left;
    padding: 6px 10px;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px; 
    color: #111;
  }

  .footer-col.newsletter button {
    width: 100%;
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
  }

  .footer-bottom {
    flex-direction: column !important; 
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px; 
  }

  .social-icons {
    gap: 12px;
  }

  .social-icons a {
    font-size: 22px; 
    padding: 8px;
  }
}

/* ===========================
   DESKTOP / TABLET FIX
=========================== */
@media (min-width: 769px) {
  .footer-col.newsletter {
    text-align: left;
  }

  .footer-col.newsletter form {
    display: flex;
    flex-direction: row;
    gap: 6px;
    max-width: 600px;
    width: 100%;
    margin: 0;
  }

  .footer-col.newsletter input {
    flex: 1 1 70%;
    height: 40px;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    color: #111;
  }

  .footer-col.newsletter button {
    flex: 1 1 30%;
    height: 40px;
    padding: 0 12px;
    background-color: #111;
    color: #FFD700;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
  }

  .footer-col.newsletter button:hover {
    background-color: #fff;
    color: #111;
  }
}

/* Sleek pointed divider after MacVillas description */
.footer-divider {
  width: 100%;
  height: 3px;
  margin: 10px 0 12px 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.8) 10%,
    rgba(0,0,0,1) 50%,
    rgba(0,0,0,0.8) 90%,
    rgba(0,0,0,0) 100%
  );
  opacity: 1;
  border: none;
}
















.counters-section {
  position: relative;
  /* Animated black-gold gradient background */
  background: linear-gradient(135deg, #000000, #111111, #1a1a1a, #2a1b00, #d4af37);
  background-size: 400% 400%;
  animation: goldFlow 15s ease infinite;

  color: #fff;
  padding: 120px 20px;
  text-align: center;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

/* Animate gradient flow */
@keyframes goldFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle overlay to soften the gold */
.counters-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15), rgba(0, 0, 0, 0.8) 80%);
  z-index: 1;
}

/* Layout */
.footer-counters {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* === Glassy Gold Cards === */
.counter.glass-card {
  flex: 1 1 220px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 50px 25px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease, transform 1s ease;
  opacity: 0;
  transform: translateY(60px);
}

/* Gold reflective frame */
.counter.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, #d4af37, #ffffff20, #d4af37);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Hover with gold glow */
.counter.glass-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 60px rgba(212, 175, 55, 0.3);
  background: rgba(255, 215, 0, 0.1);
}

/* === Slide-in Animation === */
@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(60px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delayed entrance for each card */
.counter.glass-card:nth-child(1) {
  animation: slideInUp 1s ease forwards;
  animation-delay: 0.2s;
}
.counter.glass-card:nth-child(2) {
  animation: slideInUp 1s ease forwards;
  animation-delay: 0.4s;
}
.counter.glass-card:nth-child(3) {
  animation: slideInUp 1s ease forwards;
  animation-delay: 0.6s;
}
.counter.glass-card:nth-child(4) {
  animation: slideInUp 1s ease forwards;
  animation-delay: 0.8s;
}

/* === Gold Counter Text === */
.counter .count {
  display: block;
  font-size: 3.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, #d4af37, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

/* White-gold Label Text */
.counter p {
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}










.magazine-download-card {
  width: 90%;
  max-width: 420px;
  margin: 60px auto;
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  text-align: center;
  animation: fadeIn 0.8s ease forwards;
}

.mag-title {
  font-size: 22px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 10px;
}

.mag-desc {
  font-size: 15px;
  color: #e8e8e8;
  margin-bottom: 20px;
}

.download-btn {
  display: inline-block;
  padding: 12px 22px;
  background: #ffffff;
  color: #000;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s ease;
}

.download-btn:hover {
  transform: scale(1.05);
  background: #f1f1f1;
}

/* Smooth Fade In */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}





/* Animated Background for the Card */
.magazine-download-card {
  width: 90%;
  max-width: 420px;
  margin: 60px auto;
  padding: 25px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Default bg to avoid flash */
  background-image: url('img/bg1.jpg');

  /* Animation */
  animation: bgLoop 16s infinite ease-in-out;

  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  text-align: center;
}

/* Keyframe Loop (4 backgrounds) */
@keyframes bgLoop {
  0%   { background-image: url('images/image1.jpg'); }
  25%  { background-image: url('images/image2.jpg'); }
  50%  { background-image: url('images/image3.jpg'); }
  75%  { background-image: url('images/image4.jpg'); }
  100% { background-image: url('images/Magz.jpg'); }
}