/*
Theme Name: Rio Driving School
Theme URI: https://rio.builtbyoms.net/
Author: Andrew Timmins, Online Marketing Surgery Ltd
Author URI: https://onlinemarketingsurgery.co.uk/
Description: A modern, clean base theme for Rio Driving School.
Version: 1.1.6
Text Domain: rio-driving-school
*/

:root {
  --primary: #3e71e4;
  --primary-dark: #2f57b3;
  --accent: #f4a024;
  --accent-dark: #d4891e;
  --accent-red: #e53935;
  --grey-light: #f5f6f8;
  --grey: #e2e6ee;
  --text: #1f2a44;
  --muted: #5b6477;
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(31, 42, 68, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--grey-light);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1500px, 92%);
  margin: 0 auto;
}

/* Top Social Icons */
.top-social {
  background: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid var(--grey);
  position: relative;
}

.award-banner {
  position: absolute;
  top: 49px;
  right: calc(50% - 400px);
  z-index: 9999999;
  transform: translateX(50%);
}

@media (max-width: 1400px) {
  .award-banner {
    right: 35%;
  }
}

@media (max-width: 1200px) {
  .award-banner {
    right: 25%;
  }
}

@media (max-width: 992px) {
  .award-banner {
    right: 20%;
  }
}

@media (max-width: 768px) {
  .award-banner {
    right: 15%;
    top: 35px;
  }
}

.award-image {
  max-width: 220px;
  height: auto;
  display: block;
}

.top-social .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-social-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  justify-content: space-between;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: var(--white);
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.whatsapp-button:hover,
.whatsapp-button:focus {
  background: #1ebe5a;
  color: var(--white);
  transform: translateY(-1px);
}

.whatsapp-button i {
  font-size: 1rem;
}

.social-icons {
  display: flex;
}

.site-header {
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 999;
}

.site-header__main {
  border-bottom: 1px solid var(--grey);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 6px 0;
  padding-top: 8px;
  position: relative;
}

.branding {
  grid-column: 1;
  justify-self: start;
}

.site-logo img {
  max-height: 100px;
  width: auto;
  display: block;
}

.main-navigation {
  grid-column: 2;
  justify-self: center;
}

.header-phone {
  grid-column: 3;
  justify-self: end;
}

.header-phone .phone-pill {
  margin: 0;
}

.primary-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.primary-menu li {
  position: relative;
  border-right: solid #eeeeee 1px;
  padding-right: 20px;
}

.primary-menu li:last-child {
  border-right: none;
}

.primary-menu a {
  color: var(--text);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 10px 12px;
  display: block;
}

.primary-menu li:hover > a,
.primary-menu li:focus-within > a {
  position: relative;
}

/* First menu item - keep original blue */
.primary-menu li:nth-child(1):hover > a::after,
.primary-menu li:nth-child(1):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%233e71e4" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Second menu item - red */
.primary-menu li:nth-child(2):hover > a::after,
.primary-menu li:nth-child(2):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%23c00010" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Third menu item - teal */
.primary-menu li:nth-child(3):hover > a::after,
.primary-menu li:nth-child(3):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%2371bec1" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Fourth menu item - green */
.primary-menu li:nth-child(4):hover > a::after,
.primary-menu li:nth-child(4):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%2376b120" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Fifth menu item - orange */
.primary-menu li:nth-child(5):hover > a::after,
.primary-menu li:nth-child(5):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%23d4891e" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Sixth menu item - blue */
.primary-menu li:nth-child(6):hover > a::after,
.primary-menu li:nth-child(6):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%233a5bef" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

/* Seventh menu item - orange-red */
.primary-menu li:nth-child(7):hover > a::after,
.primary-menu li:nth-child(7):focus-within > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%23e76530" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a,
.primary-menu > li.current_page_item > a,
.primary-menu > li.current_page_ancestor > a {
  position: relative;
}

.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-menu-ancestor > a::after,
.primary-menu > li.current_page_item > a::after,
.primary-menu > li.current_page_ancestor > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg class="nectar-scribble basic-underline" role="presentation" viewBox="-400 -55 730 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path style="animation-duration: 1.8s;" d="m -383.25 -6 c 55.25 -22 130.75 -33.5 293.25 -38 c 54.5 -0.5 195 -2.5 401 15" stroke="%233e71e4" pathLength="1" stroke-width="20" fill="none"></path></svg>');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
}

.primary-menu .sub-menu {
  list-style: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: var(--white);
  color: var(--text);
  padding: 10px 0;
  box-shadow: var(--shadow);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.primary-menu .sub-menu a {
  color: var(--text);
  padding: 10px 18px;
  font-weight: 500;
}

.primary-menu .sub-menu a:hover {
  background: var(--grey-light);
  color: var(--primary);
}

.social-list {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--white);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-link i {
  font-size: 1rem;
}

.social-link:hover,
.social-link:focus {
  border-color: var(--primary);
  color: var(--primary);
}

.phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  order: 2;
  border: 1px solid var(--grey);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  background: var(--white);
}

.phone-pill:hover,
.phone-pill:focus {
  border-color: var(--primary);
  color: var(--primary);
  cursor: pointer;
}

.site-header__bar {
  background: var(--primary);
  color: var(--white);
}

.header-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 95px;
  list-style: none;
  font-size: 1.03rem;
  margin: 0;
  padding: 10px 0;
}

.header-highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.header-highlight__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.75rem;
}

.header-highlight__text {
  color: var(--white);
}

.hero {
  background: linear-gradient(135deg, var(--primary), #4f87ff);
  color: var(--white);
  padding: 90px 0 70px;
}

.hero .hero-inner {
  display: grid;
  gap: 30px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
}

.hero p {
  font-size: 1.05rem;
  max-width: 520px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: none;
}

.button:hover,
.button:focus {
  background: var(--accent-dark);
  color: var(--white);
}

.section {
  padding: 70px 0;
  background: var(--white);
}

.section.alt {
  background: var(--grey-light);
}

.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.entry {
  margin: 0 0 40px;
}

.entry-title {
  margin-bottom: 12px;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-content {
  padding: 60px 0;
}

.widget-area {
  background: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 40px 0;
}

.site-footer a {
  color: var(--white);
}

.site-footer .footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 8px;
}

.footer-copyright {
    font-size: 12px;
    line-height: 8px;
}

@media (min-width: 900px) {
  .hero .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 760px) {
  .header-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .header-cta {
    align-items: flex-start;
  }

  .main-navigation {
    width: 100%;
  }

  .primary-menu {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .primary-menu .sub-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: var(--grey-light);
  }

  .primary-menu .sub-menu a {
    color: var(--text);
  }
}
