/*
Theme Name: Rankior
Theme URI: https://rankior.com
Description: A custom theme built for rankior.com
Author URI: https://rankior.com
Version: 1.0
*/

/* 1. Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

/* 2. Colors & Palette */
:root {
  --rankior-blue: #007EA8;
  --rankior-blue-dark: #00566e;
  --rankior-light: #eaf6fb;
  --rankior-white: #ffffff;
  --rankior-dark: #0a0a0a;

  --rankior-bg: #ffffff;
  --rankior-text: #1a1a1a;
  --rankior-card-bg: #fff;
  --rankior-section-bg: #eaf6fb;
}

body.dark-mode {
  --rankior-bg: #1a1a1a;
  --rankior-text: #f3f3f3;
  --rankior-card-bg: #1a1a1a;
  --rankior-section-bg: #121212;
}
body.dark-mode .bg-light {
  background-color: #222;
}
.bg-dark-gradient {
  background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%) !important;
  color: #ffffff;
}
/* 3. Typography */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--rankior-dark);
}
h1, .title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 1.1;
  color: var(--rankior-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.bg-dark .title,
body.dark-mode .title {
  color: var(--rankior-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
h2, .section-title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 1.1;
  color: var(--rankior-dark);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body {
  background: var(--rankior-bg);
  color: var(--rankior-text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}
.bg-dark .section-title,
body.dark-mode .section-title {
  color: var(--rankior-white);
}
.bg-light {
  background-color: var(--rankior-light);
}
.sub-section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-top: 2rem;
  color: var(--rankior-dark);
}
body.dark-mode .sub-section-title {
  color: var(--rankior-light);
}
p {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  color: var(--rankior-text);
}
.section-paragraph {
  font-size: 1.25rem;
  text-align: center;
  color: var(--rankior-text);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.text-center {
  text-align: center;
}
.hero h1 {
  margin-bottom: 1.5rem;
}
.hero .section-paragraph {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #fff;
}
.hero .rankior-btn {
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.hero-paragraph {
  font-size: 1.5rem;
  line-height: 1.8;
  text-align: center;
  color: var(--rankior-light);
}

/* 4. Utility Classes */
.responsive-img {
  display: block;
  max-width: 560px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 25px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.rankior-container.grid-responsive.fade-group { margin-top: 1.5rem; }

.rankior-container.grid-responsive.fade-group + .stack-center {
  margin-top: 3rem;
}

.stack-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.stack-center + .stack-center {
  margin-top: 2rem;
}
.stack-center + .stack-center:last-of-type { margin-top: 3rem; }

.highlight, .section-paragraph .highlight {
  color: var(--rankior-blue);
  font-weight: bold;
}
.gradient-highlight {
  background: linear-gradient(0deg, #53ccf3 0%, var(--rankior-blue) 54%, #00586d 88%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}
.rankior-btn, .btn-cta {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background-color: var(--rankior-blue);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}
.rankior-btn:hover, .btn-cta:hover {
  background-color: #2563eb;
}
.grid-responsive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .grid-responsive {
    grid-template-columns: 1fr;
  }
}

.layout-container,
.rankior-container {
  width: 90%;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.service-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-align: left;
}
.service-card:hover {
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--rankior-blue);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--rankior-text);
}

.service-card p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--rankior-text);
  line-height: 1.4;
}

.service-card ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  color: var(--rankior-text);
  font-size: 0.95rem;
  margin: 0;
}
body.dark-mode .service-card {
  background: #1a1a1a;
  color: #eee;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.05);
}
.rankior-collapsible {
  text-align: center;
}

.rankior-collapsible summary {
  cursor: pointer;
  list-style: none;
  padding: 0.3rem 0;
  background: transparent;
  color: var(--rankior-blue);
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--rankior-blue);
  width: fit-content;
  margin: 0 auto 1rem auto;
  border-radius: 0;
  transition: color 0.3s ease, border-color 0.3s ease;
  user-select: none;
  position: relative;
}
.rankior-collapsible-content { margin-top: 2rem; }

.section-separator {
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
  margin-bottom: -1px;
}
.section-separator svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}
.rounded-separator {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
  margin-top: -2px;
}
.rounded-separator svg {
  display: block;
  width: 100%;
  height: 100px;
}

.rounded-separator.flipped svg {
  transform: rotate(180deg);
}
body.dark-mode .rounded-separator svg path {
  fill: #1a1a1a;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 5. Global Section Structure */
.rankior-section {
  padding: 5rem 1rem;
}
.rankior-section h3, h4, h5, h6 {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--rankior-text);
}
.rankior-content {
  background-color: var(--rankior-white);
  color: var(--rankior-text);
}
.rankior-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.rankior-content p {
  margin-bottom: 1rem;
  font-size: 20px;
  line-height: 1.6;
}

.rankior-content .rankior-btn {
  margin-top: 2rem;
}

.two-columns {
  display: flex;
  gap: 5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.two-columns .col {
  flex: 1 1 45%;
  min-width: 300px;
}
.two-columns .col.text-content {
  padding-left: 3rem;
}

@media (max-width: 768px) {
  .two-columns {
    flex-direction: column;
    text-align: center;
  }
  .two-columns .col img {
    max-width: 80%;
    margin: 0 auto;
  }
    .two-columns .col.text-content {
    padding-left: 0;
  }
  .rankior-content h2 {
    font-size: 1.5rem;
  }
}

.rankior-content .col:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.dark-mode .rankior-content {
  background-color: #1a1a1a;
}

/* 6. Image styling */
.responsive-img {
  width: auto;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 25px;
}

/* Image Size Variants */
.img-sm { max-width: 260px; }
.img-md { max-width: 460px; }
.img-lg { max-width: 720px; }

@media (max-width: 768px) {
  .img-sm { max-width: 180px; }
  .img-md { max-width: 360px; }
  .img-lg { max-width: 100%; }
}

.img-shadow {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.rankior-logo img {
  max-width: 160px;
}

/* 6. Dark Mode */
body.dark-mode {
  background: #1a1a1a;
  color: #f3f3f3;
}
body.dark-mode .rankior-header,
body.dark-mode .main-nav .menu,
body.dark-mode .service-card,
body.dark-mode .problem-solution,
body.dark-mode .quote-section {
  background-color: #1a1a1a;
  color: #eee;
}
body.dark-mode .main-nav .menu li a,
body.dark-mode .footer-nav li a,
body.dark-mode .social-link {
  color: #fff;
}
body.dark-mode .rankior-header {
  border-bottom: 1px solid #333;
}

/* Dark Mode Toggle Button */
.dark-toggle {
  width: 2rem;
  height: 2rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.5rem;
  align-items: center;
  justify-content: center;
  transition: background-image 0.3s ease;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%234F4F4F' stroke='%23333' stroke-width='1.5' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path stroke-linecap='round' stroke-linejoin='round' d='M21 12.79A9 9 0 1111.21 3a7 7 0 109.79 9.79z'/></svg>");
}

/* 7. Header */
.rankior-header {
  min-height: 80px;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.header-container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2rem;
  position: relative;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}
.main-nav .menu {
  list-style: none;
  align-items: center;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}
.main-nav .menu li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
}
.main-nav .menu li a:hover,
.main-nav .menu li a:focus {
  color: var(--rankior-blue); /* your brand accent color */
}
.desktop-only { display: flex; align-items: center; gap: 1rem; }
.mobile-only, .mobile-nav-toggle { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; margin-top: 1rem; text-align: center; }
  .mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--rankior-blue);
    z-index: 1002;
  }
  .rankior-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
  }
  .btn-cta { display: none; }
  .menu .btn-cta {
    display: block;
    margin-top: 1rem;
    text-align: center;
  }
  .main-nav .menu {
    flex-direction: column;
    background-color: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
  }
  .main-nav .menu.show {
    display: flex;
    border-radius: 12px;
  }
  .close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    margin-left: auto;
    display: block;
  }
  .dark-toggle {
    color: var(--rankior-blue);
  }
  .menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 998;
    transition: opacity 0.3s ease;
    opacity: 0;
  }
  .menu-backdrop.show {
    display: block;
    opacity: 1;
  }
  body.dark-mode .main-nav .menu {
    background-color: #1a1a1a;
    border: 1px solid #333;
  }
  body.dark-mode .main-nav .menu li a,
  body.dark-mode .close-menu {
    color: #fff;
  }
}

/* 8. Footer */
.site-footer {
  background-color: var(--rankior-dark);
  color: var(--rankior-light);
  padding: 1rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-areas:
    "logo services newsletter"
    "logo posts resources";
  grid-template-columns: repeat(3, 1fr);
  gap: 7rem;
  padding: 4rem 1rem;
  background-color: var(--rankior-dark);
}
.footer-logo-column    { grid-area: logo; }
.footer-services   { grid-area: services; }
.footer-newsletter { grid-area: newsletter; }
.featured-posts    { grid-area: posts; }
.footer-resources  { grid-area: resources; }

.site-footer h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--rankior-white);
}
.footer-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--rankior-white);
  margin-top: 1rem;
}
.footer-text li {
  margin: 2rem 0 0.3rem;
}
.site-footer a {
  text-decoration: none;
  color: #ccc;
}
.site-footer a:hover {
  color: var(--rankior-blue);
}

.site-footer ul,
.site-footer li {
  list-style: none;
}
.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-newsletter {
  margin-top: 3rem;
}
.newsletter-form {
  display: flex;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background-color: #111;
  color: #eee;
  height: 100%;
}
.newsletter-form button {
  background-color: var(--rankior-blue);
  border: none;
  color: white;
  padding: 0 1rem;
  cursor: pointer;
}

.social-icons {
  display: flex;
  justify-content: left;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
}
.social-icons a {
  color: #ccc;
  transition: color 0.3s ease;
  padding: 0.5rem;
}
.social-icons a:hover {
  color: var(--rankior-blue);
}
.social-icons svg {
  display: block;
  width: 20px;
  height: 20px;
}

.footer-bottom {
  border-top: 1px solid #222;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.85rem;
  color: #888;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-areas:
      "logo"
      "newsletter"
      "services"
      "posts"
      "resources";
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
  }
  .social-icons {
    justify-content: center;
  }
}