/* Global Styles for IJABO School of Massage Therapy and Bodywork */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
  --primary-color: #111184;
  --secondary-color: #4a9eca;
  --accent-color: #fed600;
  --dark-color: #1a1a2e;
  --light-color: #111184;
  --text-color: #ffffff;
  --text-light: #e0e0e0;
  --white: #ffffff;
  --gold: #fed600;
  --success: #28a745;
  --warning: #fed600;
  --danger: #dc3545;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--primary-color);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--white);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

a:hover {
  color: var(--white);
}

/* Section Titles */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  color: var(--gold);
}

.section-title p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1rem auto;
  color: var(--text-light);
}

/* Dropdown Menu Styles */
.nav-menu li {
  position: relative;
}

/* Scroll Up Button Styles */
#scrollUpBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 2000;
  font-size: 1.2rem;
  border: none;
  outline: none;
  background-color: var(--gold);
  color: var(--primary-color);
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 20px;
}

#scrollUpBtn:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#scrollUpBtn i {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-5px);}
  60% {transform: translateY(-3px);}
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary-color);
  min-width: 200px;
  box-shadow: var(--box-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  list-style: none;
  padding: 0.5rem 0;
  border-radius: var(--border-radius);
  z-index: 1001;
}

.nav-menu li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
  margin: 0; /* Reset margin from other styles */
}

.dropdown-menu a {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--white);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: transparent;
  color: var(--gold);
  padding-left: 2rem;
}

.dropdown-menu a::after {
  display: none; /* Remove underline effect from main nav links */
}

/* Mobile Dropdown Support */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* Hidden by default on mobile */
    padding: 0;
    width: 100%;
  }
  
  .nav-menu li:hover .dropdown-menu {
    display: block; /* Show on hover/tap for simplicity in this implementation */
  }
  
  .dropdown-menu a {
    padding-left: 2rem;
  }
}

/* Fix for Wobbling / Horizontal Scroll */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  position: relative;
}

img, video, iframe {
  max-width: 100% !important;
  height: auto;
}

/* Header Styles */
.site-header {
  background-color: var(--primary-color);
  box-shadow: var(--box-shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
}

.logo-image {
  height: 72px;
  width: auto;
}

.logo h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
}

.logo-subtitle {
  font-size: 0.8rem;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  font-weight: 700;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--gold);
}

.nav-link::after {
  display: none;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  /* Color removed to match other menus */
}

.nav-link-cta {
  background-color: var(--white);
  border: 1px solid var(--white);
  color: var(--primary-color) !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: var(--border-radius);
  font-weight: 700;
}

.nav-link-cta::after {
  display: none;
}

.nav-link-cta:hover {
  background-color: var(--gold);
  color: #000000 !important;
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--white) !important;
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-color);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-light);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--gold);
  padding-left: 5px;
}

/* Contact Info Links in Footer */
.footer-section .contact-info a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section .contact-info a:hover {
  color: #000000;
  background-color: var(--white); /* Optional: add background to make black text visible if on dark bg, but user just said black on hover. */
  padding: 0 5px;
  border-radius: 4px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: #000000;
  transform: translateY(-3px);
}

/* Updated Contact Info Styling */
.contact-info {
  display: inline-block; /* Allows the list to be centered by parent while keeping internal structure */
  text-align: left;      /* Ensures icons and text align left relative to each other */
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start; /* Aligns content to the start (left) */
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.9rem;
}

.contact-text {
  text-align: left; /* Aligns text lines to the left */
}

.contact-info i {
  color: var(--accent-color);
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.footer-note {
  font-style: italic;
  opacity: 0.8;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--gold);
  color: #000000;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--white);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #3a8eb8;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background-color: var(--gold);
  color: #000000;
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.mt-3 {
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--header-offset, 70px);
    flex-direction: column;
    background-color: var(--primary-color) !important;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--box-shadow);
    padding: 2rem 0;
    gap: 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Center key content on mobile (footer remains left-aligned) */
  .section-title, 
  .hero-content, 
  .features-grid .feature-item {
    text-align: center !important;
  }

  .hero-buttons {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .programs-grid, .features-grid {
    grid-template-columns: 1fr !important;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 15px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  #scrollUpBtn {
    bottom: 80px;
    right: 20px;
  }
}

/* Tablet Layout Support */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 95%;
    padding: 0 15px;
  }

  /* Footer Layout for Tablets (2 columns) */
  .footer-content {
    grid-template-columns: 1fr 1fr !important;
    text-align: left !important;
  }

  .footer-section h3, 
  .footer-section h4,
  .footer-section p,
  .footer-section ul li,
  .footer-section .contact-info {
    text-align: left !important;
  }
  
  /* Ensure logo text aligns left on tablet */
  .logo-text {
    text-align: left !important;
  }

  /* Compact Menu for Tablet */
  .nav-menu {
    gap: 0.8rem;
  }
  
  .nav-link {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .logo-image {
    height: 50px; /* Smaller logo */
  }

  .logo-subtitle {
    display: block;
    font-size: 0.7rem;
    line-height: 1.1;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .programs-grid, 
  .features-grid, 
  .testimonials-grid {
    gap: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .hero-content {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.4rem;
  }

  .logo .logo-subtitle {
    font-size: 0.65rem;
  }
}

/* Loading Animation */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
