/*
Theme Name: Americano Sports
Theme URI: https://americanosports.com
Author: Americano Sports Team
Author URI: https://americanosports.com
Description: A modern, responsive WordPress directory theme for sports clubs across the United States
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: americanosports
Tags: directory, sports, responsive, modern
*/

/* ============================================
   CSS VARIABLES - DESIGN SYSTEM
   ============================================ */
:root {
  /* Color Palette */
  --color-primary: #0B1F3B;
  --color-secondary: #D61F26;
  --color-accent: #FFB703;
  --color-background: #F6F8FB;
  --color-surface: #FFFFFF;
  --color-text-primary: #0E1726;
  --color-text-secondary: #55657A;
  --color-border: #E3E8EF;
  --color-link: #1D4ED8;
  --color-focus: #2563EB;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-error: #DC2626;
  
  /* Typography */
  --font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  
  /* Layout Tokens */
  --max-width: 1200px;
  --section-padding: 64px;
  --section-padding-mobile: 32px;
  --card-radius: 14px;
  --grid-gap: 24px;
  --grid-gap-mobile: 16px;
  --tap-target: 44px;
  
  /* Animation */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

h5 {
  font-size: 1.25rem;
  font-weight: 600;
}

h6 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

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

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

a:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   SKIP TO CONTENT (ACCESSIBILITY)
   ============================================ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 1rem 1.5rem;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 0;
  outline: 2px solid var(--color-focus);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding) 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(11, 31, 59, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  min-height: 80px;
}

.site-logo,
.custom-logo-link {
  display: flex;
  align-items: center;
}

.site-logo img,
.custom-logo {
  height: 50px;
  width: auto;
  transition: transform var(--transition-fast);
}

.site-logo:hover img,
.custom-logo-link:hover .custom-logo {
  transform: scale(1.05);
}

.site-logo:focus,
.custom-logo-link:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.primary-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.primary-navigation a {
  font-weight: 500;
  color: var(--color-text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
}

.primary-navigation a:hover {
  background: var(--color-background);
  color: var(--color-secondary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-primary);
  min-width: var(--tap-target);
  min-height: var(--tap-target);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

.footer-logo img {
  height: 60px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

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

.footer-navigation li {
  margin-bottom: 0.75rem;
}

.footer-navigation a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color var(--transition-fast);
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-navigation a:hover {
  color: var(--color-accent);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  min-height: var(--tap-target);
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: #B81A20;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(214, 31, 38, 0.3);
}

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

.btn-secondary:hover {
  background: #0A1A30;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 31, 59, 0.3);
}

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

.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-background);
}

.btn:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(11, 31, 59, 0.08);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(11, 31, 59, 0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.card-title a {
  color: inherit;
  transition: color var(--transition-fast);
}

.card-title a:hover {
  color: var(--color-secondary);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.card-meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  min-height: var(--tap-target);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
  border-color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  min-height: 800px;
  background-image: url('assets/hero-section.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(11, 31, 59, 0.85) 0%, rgba(214, 31, 38, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
  background: var(--color-surface);
  padding: 3rem 0;
  box-shadow: 0 2px 8px rgba(11, 31, 59, 0.08);
}

.search-form {
  max-width: 600px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--color-text-secondary);
  font-weight: 600;
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-secondary);
}

.breadcrumbs .current {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ============================================
   RATING DISPLAY
   ============================================ */
.rating {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  color: var(--color-accent);
}

.rating-stars {
  display: flex;
  gap: 0.125rem;
}

.rating-value {
  color: var(--color-text-primary);
}

.rating-count {
  color: var(--color-text-secondary);
  font-weight: 400;
  font-size: 0.875rem;
}

/* ============================================
   WORK HOURS
   ============================================ */
.work-hours {
  background: var(--color-background);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.work-hours-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.work-hours-list {
  display: grid;
  gap: 0.5rem;
}

.work-hours-day {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.work-hours-day:last-child {
  border-bottom: none;
}

.day-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.day-hours {
  color: var(--color-text-secondary);
}

.day-hours.open {
  color: var(--color-success);
  font-weight: 500;
}

.day-hours.closed {
  color: var(--color-error);
}

/* ============================================
   ATTRIBUTES LIST
   ============================================ */
.attributes-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.attribute-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-background);
  border-radius: 8px;
}

.attribute-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-success);
  flex-shrink: 0;
}

.attribute-item.unavailable svg {
  color: var(--color-text-secondary);
}

/* ============================================
   CONTACT INFO
   ============================================ */
.contact-info {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-background);
  border-radius: 8px;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--color-link);
  font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
    --grid-gap: var(--grid-gap-mobile);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.25rem;
  }
  
  .hero-section {
    min-height: 600px;
    background-attachment: scroll;
  }
  
  .primary-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: 0 4px 12px rgba(11, 31, 59, 0.15);
    padding: 1rem;
  }
  
  .primary-navigation.active {
    display: block;
  }
  
  .primary-navigation ul {
    flex-direction: column;
    gap: 0;
  }
  
  .primary-navigation a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-section {
    background-attachment: scroll;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .search-section,
  .mobile-menu-toggle {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* ============================================
   SIDEBAR & WIDGETS
   ============================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  margin: 3rem 0;
}

.main-content {
  min-width: 0;
}

.widget-area {
  position: sticky;
  top: 100px;
  align-self: start;
}

.widget,
.footer-widget {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--card-radius);
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(11, 31, 59, 0.08);
}

.widget-title,
.footer-widget-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-secondary);
}

.widget ul,
.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li,
.footer-widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.widget li:last-child,
.footer-widget li:last-child {
  border-bottom: none;
}

.widget a,
.footer-widget a {
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
  display: block;
}

.widget a:hover,
.footer-widget a:hover {
  color: var(--color-secondary);
  padding-left: 0.5rem;
}

/* Widget Specific Styles */
.widget select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
}

.widget select:focus {
  outline: none;
  border-color: var(--color-focus);
}

.widget input[type="text"],
.widget input[type="email"],
.widget input[type="search"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
}

.widget input[type="text"]:focus,
.widget input[type="email"]:focus,
.widget input[type="search"]:focus {
  outline: none;
  border-color: var(--color-focus);
}

.widget input[type="submit"],
.widget button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
}

.widget input[type="submit"]:hover,
.widget button:hover {
  background: #B81A20;
  transform: translateY(-2px);
}

/* Footer Widgets */
.footer-widget {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.footer-widget-title {
  color: white;
  border-bottom-color: var(--color-accent);
}

.footer-widget a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-widget a:hover {
  color: var(--color-accent);
}

.footer-widget li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Sidebar */
@media (max-width: 992px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .widget-area {
    position: static;
  }
}

/* ============================================
   CUSTOM WIDGETS STYLES
   ============================================ */

/* Random Posts Widget */
.random-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.random-post-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.random-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.random-post-item:first-child {
  padding-top: 0;
}

.random-post-thumbnail {
  flex-shrink: 0;
}

.random-post-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform var(--transition-fast);
}

.random-post-thumbnail a:hover img {
  transform: scale(1.05);
}

.random-post-content {
  flex: 1;
  min-width: 0;
}

.random-post-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.random-post-title a {
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.random-post-title a:hover {
  color: var(--color-secondary);
}

.random-post-date {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  display: block;
}

/* Random Listings Widget */
.random-listings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.random-listing-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.random-listing-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.random-listing-item:first-child {
  padding-top: 0;
}

.random-listing-thumbnail {
  flex-shrink: 0;
}

.random-listing-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform var(--transition-fast);
}

.random-listing-thumbnail a:hover img {
  transform: scale(1.05);
}

.random-listing-content {
  flex: 1;
  min-width: 0;
}

.random-listing-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.random-listing-title a {
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.random-listing-title a:hover {
  color: var(--color-secondary);
}

.random-listing-address {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 0.5rem;
}

.random-listing-rating {
  font-size: 0.8125rem;
}

.random-listing-rating .rating {
  gap: 0.25rem;
}

.random-listing-rating .rating-stars svg {
  width: 12px;
  height: 12px;
}

.random-listing-rating .rating-value {
  font-size: 0.8125rem;
}

.random-listing-rating .rating-count {
  font-size: 0.75rem;
}

/* Footer Widget Adjustments for Custom Widgets */
.footer-widget .random-post-item,
.footer-widget .random-listing-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-widget .random-post-title a,
.footer-widget .random-listing-title a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-widget .random-post-title a:hover,
.footer-widget .random-listing-title a:hover {
  color: var(--color-accent);
}

.footer-widget .random-post-date,
.footer-widget .random-listing-address {
  color: rgba(255, 255, 255, 0.7);
}
