/*
Theme Name: FilmyFly Gateway
Theme URI: https://example.com/
Author: Custom WordPress Theme
Description: A WordPress recreation of the supplied Blogger FilmyFly gateway theme, preserving the supplied mobile and desktop design.
Version: 1.0.1
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: filmyfly-gateway
*/

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f2f5f9;
  color: #333333;
  line-height: 1.6;
  margin: 0;
  padding: 10px 0 40px 0;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 769px) {
  .wrapper {
    max-width: 80%;
    width: 80%;
    margin: 0 auto;
    padding: 20px 2%;
  }
}

.top-header {
  text-align: center;
  margin-bottom: 20px;
}

.top-header img {
  max-width: 320px;
  height: auto;
}

.card,
.sub-cat-item,
.btn-outline,
.btn-yellow-large,
.mini-card,
.tag-btn,
.top-header img,
.footer img {
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease;
}

.card:active {
  transform: scale(0.985);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sub-cat-item:active,
.btn-outline:active,
.btn-yellow-large:active,
.mini-card:active,
.tag-btn:active,
.top-header img:active,
.footer img:active {
  transform: scale(0.95);
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e1e8ed;
}

.card-title-main {
  color: #1a0dab;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 8px;
  display: block;
  transition: opacity 0.15s ease;
}

.card-title-main:hover {
  text-decoration: underline;
}

.card-title-main:active {
  opacity: 0.7;
}

.card-desc {
  color: #4d5156;
  font-size: 16px;
  margin-bottom: 22px;
}

.sub-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sub-cat-item h4 {
  color: #1a0dab;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}

.sub-cat-item p {
  color: #4d5156;
  font-size: 15px;
  margin: 0;
}

.hero-box {
  text-align: center;
  padding: 40px 20px;
}

.hero-title {
  color: #b8860b;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 20px;
}

.hero-text {
  font-size: 17px;
  color: #555555;
  max-width: 800px;
  margin: 0 auto 25px auto;
}

.btn-outline {
  display: inline-block;
  border: 2px solid #d4af37;
  color: #8b6508;
  background: #ffffff;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.btn-outline:hover {
  background: #fffdf0;
}

.hero-sublink {
  display: block;
  font-size: 16px;
  color: #0044cc;
  text-decoration: underline;
  margin-bottom: 30px;
  transition: opacity 0.15s ease;
}

.hero-sublink:active {
  opacity: 0.7;
}

.btn-yellow-large {
  display: inline-block;
  background: #ffd700;
  color: #000000;
  font-weight: bold;
  font-size: 18px;
  padding: 16px 40px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.btn-yellow-large:hover {
  background: #f0c800;
}

.section-title {
  color: #b8860b;
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.section-subtitle {
  color: #b8860b;
  font-size: 20px;
  font-weight: bold;
  margin: 20px 0 10px 0;
}

.section-desc {
  font-size: 16px;
  color: #555555;
  margin-bottom: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.mini-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  background: #fafafa;
}

.mini-card h4 {
  color: #b8860b;
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px;
}

.mini-card p {
  font-size: 15px;
  color: #555555;
  margin: 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.tag-btn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #000000;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
}

.tag-btn:hover {
  background: #fff1b8;
}

.list-styled {
  padding-left: 22px;
  margin-top: 10px;
}

.list-styled li {
  font-size: 16px;
  color: #444444;
  margin-bottom: 8px;
}

.legal-box {
  background: #ffeef0;
  border-left: 5px solid #f44336;
  padding: 20px;
  border-radius: 6px;
  margin-top: 15px;
}

.legal-box h4 {
  color: #d32f2f;
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px;
}

.legal-box p {
  font-size: 15px;
  color: #444444;
  margin: 0 0 10px;
}

.legal-box p:last-child {
  margin-bottom: 0;
}

.cta-button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 15px;
  color: #666666;
}

.footer img {
  max-width: 200px;
  margin-bottom: 15px;
}

.footer-links {
  margin: 15px 0;
}

.footer-links a {
  color: #b8860b;
  margin: 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* WordPress post pages */
.post-card .post-title,
.post-card h1,
.post-card h2,
.post-card h3 {
  color: #b8860b;
}

.post-card .entry-content,
.post-card .entry-content p,
.post-card .entry-content li {
  color: #555555;
}

.post-card .entry-content img {
  display: block;
  margin: 15px auto;
  border-radius: 8px;
}

.download-cta-box {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
}

.download-cta-box h4 {
  margin: 0 0 15px;
  color: #8b6508;
}

.tg-btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.tg-btn {
  display: inline-block;
  background: #ffd700;
  color: #000000;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 28px;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

.post-meta-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #666666;
  font-size: 14px;
  margin-top: 16px;
}

.post-footer {
  margin-top: 25px;
  color: #666666;
  font-size: 14px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.comments-area {
  margin-top: 25px;
}

/* WordPress admin bar compensation */
.admin-bar .top-header {
  margin-top: 10px;
}

@media (max-width: 768px) {
  /* Mobile reference-match: full viewport, no page-level side gutters.
     Sections/cards keep their own internal spacing, while the header logo
     spans the viewport like the supplied reference. */
  html,
  body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .top-header {
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    text-align: center;
  }

  .top-header a {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .top-header img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    object-fit: cover;
    object-position: center;
  }

  .grid-3,
  .grid-4,
  .sub-cat-grid {
    grid-template-columns: 1fr;
  }

  .card {
    width: auto;
    margin-left: 16px;
    margin-right: 16px;
    padding: 16px;
  }

  .hero-title {
    font-size: 20px;
  }

  .btn-yellow-large {
    width: 100%;
    text-align: center;
  }

  .cta-button-group {
    flex-direction: column;
  }

  .tg-btn-group {
    flex-direction: column;
  }

  .tg-btn {
    width: 100%;
    text-align: center;
  }

  body {
    font-size: 14px;
  }

  .card-title-main {
    font-size: 20px;
  }

  .card-desc {
    font-size: 13px;
  }

  .sub-cat-item h4 {
    font-size: 14px;
  }

  .sub-cat-item p {
    font-size: 12px;
  }

  .hero-text {
    font-size: 13.5px;
  }

  .btn-outline {
    font-size: 13px;
  }

  .hero-sublink {
    font-size: 13px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  .section-desc {
    font-size: 13px;
  }

  .mini-card h4 {
    font-size: 15px;
  }

  .mini-card p {
    font-size: 12px;
  }

  .tag-btn {
    font-size: 12px;
  }

  .list-styled li {
    font-size: 13px;
  }

  .legal-box h4 {
    font-size: 15px;
  }

  .legal-box p {
    font-size: 12px;
  }

  .footer {
    width: 100%;
    margin: 0;
    padding: 26px 16px 40px;
    text-align: center;
  }

  .footer img {
    display: block;
    width: min(230px, 70vw);
    max-width: 230px;
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
  }

  .footer {
    font-size: 12px;
  }

  .footer-links a {
    font-size: 12px;
    margin: 0 5px;
  }
}


/* Desktop reference-match: keep the supplied mobile layout unchanged. */
@media (min-width: 769px) {
  .top-header {
    margin-bottom: 8px;
  }

  .top-header img {
    display: block;
    width: 430px;
    max-width: 430px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
  }

  .footer img {
    display: block;
    width: 200px;
    max-width: 200px;
    height: auto;
    margin: 0 auto 15px;
    object-fit: contain;
  }
}

/* Preserve the supplied theme's automatic night mode */
@media (prefers-color-scheme: dark) {
  html,
  .wrapper {
    color: #e6edf3;
  }


  body {
    background-color: #0d1117;
    color: #e6edf3;
  }

  .card {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }

  .card-title-main,
  .sub-cat-item h4,
  .hero-sublink,
  .footer-links a {
    color: #58a6ff;
  }

  .card-desc,
  .sub-cat-item p,
  .hero-text,
  .section-desc,
  .mini-card p,
  .list-styled li,
  .legal-box p,
  .footer,
  .post-card .entry-content,
  .post-card .entry-content p,
  .post-card .entry-content li {
    color: #8b949e !important;
  }

  .hero-title,
  .section-title,
  .section-subtitle,
  .mini-card h4 {
    color: #d2a835;
  }

  .section-title {
    border-bottom-color: #30363d;
  }

  .btn-outline {
    background: transparent;
    border-color: #d2a835;
    color: #d2a835;
  }

  .btn-outline:hover {
    background: rgba(210, 168, 53, 0.1);
  }

  .btn-yellow-large,
  .tg-btn {
    background: #d2a835;
    color: #000000;
  }

  .btn-yellow-large:hover {
    background: #ebd06a;
  }

  .tag-btn {
    background: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
  }

  .tag-btn:hover {
    background: #30363d;
  }

  .mini-card {
    background: #0d1117;
    border-color: #30363d;
  }

  .legal-box {
    background: #3b1d1e;
    border-left-color: #f85149;
  }

  .legal-box h4 {
    color: #ff7b72;
  }

  .post-footer {
    border-top-color: #30363d;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 10px 14px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #b8860b;
  border-radius: 6px;
}

.skip-link:focus {
  left: 8px;
}

.card-title-main {
  margin-top: 0;
}
