/* 
Theme Name: RankGuruji
Description: Main CSS file for RankGuruji Theme
Version: 1.0.0
*/

/* Set main reusable colors and fonts using CSS variables */
:root {
  --font-default: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-primary: "Amatic SC", sans-serif;
  --font-secondary: "Inter", sans-serif;
  --color-default: #212529;
  --color-primary: #ce1212;
  --color-secondary: #37373f;
  scroll-behavior: smooth;
}

/* General */
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-default);
  color: var(--color-default);
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: #ec2727;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
}

/* Header */
.header {
  background: #fff;
  transition: all 0.5s;
  z-index: 997;
  height: 90px;
  border-bottom: 1px solid #fff;
}

@media (max-width: 575px) {
  .header {
    height: 70px;
  }
}

.header .logo img {
  max-height: 40px;
  margin-right: 6px;
}

.header .logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: #000;
  margin: 0;
  font-family: var(--font-secondary);
}

.header .logo h1 span {
  color: var(--color-primary);
}

/* Navigation */
.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px 30px;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 600;
  color: #7f7f90;
  white-space: nowrap;
  transition: 0.3s;
}

.navbar a i {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
}

.navbar a:hover {
  color: #000;
}

.navbar .active {
  color: #000;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  color: var(--color-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 0;
  transition: 0.5s;
  display: none;
}

@media (max-width: 1279px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    border-left: 1px solid #666;
    bottom: 0;
    transition: 0.3s;
    z-index: 9997;
  }
  
  .navbar ul {
    position: absolute;
    inset: 0;
    padding: 50px 0 10px 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.9);
    overflow-y: auto;
    transition: 0.3s;
    z-index: 9998;
  }
  
  .mobile-nav-active .navbar {
    right: 0;
  }
}

/* Hero Section */
.hero {
  width: 100%;
  background-size: cover;
  position: relative;
  min-height: 60vh;
  padding: 120px 0 60px 0;
}

.hero h2 {
  font-size: 64px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-secondary);
  font-family: var(--font-primary);
}

.hero h2 span {
  color: var(--color-primary);
}

.hero p {
  color: #4f4f5a;
  font-weight: 400;
  margin-bottom: 30px;
}

@media (max-width: 640px) {
  .hero h2 {
    font-size: 36px;
  }
}

/* Buttons */
.btn-book-a-table {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  display: inline-block;
  padding: 12px 36px;
  border-radius: 50px;
  transition: 0.5s;
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 8px 28px rgba(206, 18, 18, 0.2);
}

.btn-book-a-table:hover {
  background: rgba(206, 18, 18, 0.8);
  color: #fff;
}

/* Footer */
.footer {
  font-size: 14px;
  background-color: #1f1f24;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.7);
  width: 100%;
}

.footer .footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: 0.3s;
  margin-right: 15px;
}

.footer .footer-links a:hover {
  color: #fff;
}

.footer .copyright {
  text-align: center;
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--color-primary);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.scroll-top:hover {
  background: #ec2727;
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #fff;
  transition: all 0.6s ease-out;
  width: 100%;
  height: 100vh;
}

#preloader:before,
#preloader:after {
  content: "";
  position: absolute;
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: animate-preloader 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

#preloader:after {
  animation-delay: -0.5s;
}

@keyframes animate-preloader {
  0% {
    width: 10px;
    height: 10px;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    opacity: 1;
  }
  100% {
    width: 72px;
    height: 72px;
    top: calc(50% - 36px);
    left: calc(50% - 36px);
    opacity: 0;
  }
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  border: 3px solid #da2b2b;
  overflow-x: auto;
  font-size: 0.8rem;
}

th, td {
  padding: 2px;
  border: 1px solid #7f0a0a;
}

th {
  color: white;
  background-color: #da2b2b;
}

/* Forms */
form {
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
}

form input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

form input[type="submit"] {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

/* Answer Key specific */
.answer-key-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
}

.exam-meta .badge {
  padding: 8px 12px;
  font-size: 14px;
}

.calculator-section {
  border: 1px solid #dee2e6;
}

.calculator-section .btn-danger {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.calculator-section .btn-danger:hover {
  background-color: #ec2727;
  border-color: #ec2727;
}

/* Breadcrumbs */
.breadcrumb {
  background: rgba(55, 55, 63, 0.05);
  padding: 15px;
  border-radius: 5px;
}

.breadcrumb a {
  color: var(--color-primary);
}

/* Pagination */
.pagination-wrapper {
  margin-top: 30px;
}

.pagination {
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border: 1px solid #dee2e6;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 5px;
}

.pagination .page-numbers.current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .page-numbers:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 28px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .footer .footer-links {
    text-align: center;
  }
  
  .footer .footer-links a {
    display: inline-block;
    margin: 5px 10px;
  }
}