/*
Theme Name: UltraLean Travel
Theme URI: https://turbodealtravel.com
Author: Your Name
Author URI: https://turbodealtravel.com
Description: A lightning-fast, WCAG 2.2 AA compliant block theme for travel deals websites. Features excellent Core Web Vitals, mobile-first responsive design, and clean travel aesthetics. Perfect for turbodealtravel.com.
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.0
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: ultralean-travel
Tags: block-themes, full-site-editing, accessibility-ready, blog, e-commerce, travel, performance, one-column, two-columns, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/*
 * UltraLean Travel Theme
 * Extremely lightweight, accessibility-first WordPress block theme
 * WCAG 2.2 AA + Section 508 + ADA compliant
 * Core Web Vitals optimized
 */

/* ===================================
   CRITICAL CSS - Inlined for LCP
   =================================== */

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1a2332;
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improved readability */
p, li, td, th {
  max-width: 70ch;
}

/* Skip Link - Accessibility Must-Have */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  z-index: 999999;
  padding: 0.75rem 1.5rem;
  background-color: #006d77;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 0.25rem 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #f4a261;
  outline-offset: 2px;
}

/* Focus Styles - WCAG 2.2 AA (3:1 contrast minimum) */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
summary:focus,
[tabindex]:focus {
  outline: 3px solid #f4a261;
  outline-offset: 2px;
  border-radius: 2px;
}

a:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible {
  outline: 3px solid #f4a261;
  outline-offset: 2px;
}

/* Links */
a {
  color: #006d77;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: #004d54;
  text-decoration-color: #f4a261;
}

a:visited {
  color: #004d54;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75em;
  color: #1a2332;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h5, h6 {
  font-size: 1.125rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}

/* Buttons & Touch Targets - Minimum 44x44px */
button,
.wp-block-button__link,
.wp-element-button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: #006d77;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: #004d54;
  transform: translateY(-1px);
}

button:active,
.wp-block-button__link:active,
.wp-element-button:active {
  transform: translateY(0);
}

/* Forms - Accessible & Touch-Friendly */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  background-color: #ffffff;
  color: #1a2332;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #006d77;
  box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1a2332;
}

/* WordPress Blocks - Spacing */
.wp-block-group,
.wp-block-cover,
.wp-block-columns {
  margin-bottom: 2rem;
}

/* Container Queries Support */
@supports (container-type: inline-size) {
  .wp-block-group {
    container-type: inline-size;
    container-name: group;
  }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
  a:focus,
  button:focus,
  input:focus {
    outline: 3px solid;
  }
  
  button,
  .wp-element-button {
    border: 1px solid;
  }
}

/* ===================================
   LAYOUT & STRUCTURE
   =================================== */

.wp-site-blocks {
  padding: 0;
}

.wp-block-group.has-background {
  padding: 2rem 1rem;
}

/* Header Spacing */
header.wp-block-template-part {
  margin-bottom: 0;
}

/* Main Content Area */
main {
  min-height: 50vh;
  padding: 2rem 1rem;
}

/* Footer */
footer.wp-block-template-part {
  margin-top: auto;
  padding: 2rem 1rem;
  background-color: #1a2332;
  color: #ffffff;
}

footer a {
  color: #ffffff;
}

footer a:hover {
  color: #f4a261;
}

/* ===================================
   NAVIGATION
   =================================== */

.wp-block-navigation {
  font-size: 1rem;
}

.wp-block-navigation-item a {
  padding: 0.75rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.wp-block-navigation__responsive-container.is-menu-open {
  padding: 1.5rem;
}

/* Mobile Menu Button */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem;
}

/* ===================================
   TRAVEL-SPECIFIC COMPONENTS
   =================================== */

/* Hero Section */
.travel-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background-color: #006d77;
  color: #ffffff;
}

.travel-hero h1 {
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Deal Cards */
.deal-card {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.deal-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.deal-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.deal-card-content {
  padding: 1.5rem;
}

/* Price Badge */
.price-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f4a261;
  color: #1a2332;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

/* Search Form */
.travel-search-form {
  background-color: #f7fafc;
  padding: 2rem;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

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

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Text Alignment */
.has-text-align-left {
  text-align: left;
}

.has-text-align-center {
  text-align: center;
}

.has-text-align-right {
  text-align: right;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (min-width: 600px) {
  main {
    padding: 3rem 2rem;
  }
  
  .wp-block-group.has-background {
    padding: 3rem 2rem;
  }
  
  .travel-hero {
    min-height: 500px;
    padding: 4rem 2rem;
  }
}

@media (min-width: 782px) {
  body {
    font-size: 1.125rem;
  }
  
  main {
    padding: 4rem 2rem;
  }
  
  .travel-hero {
    min-height: 600px;
    padding: 5rem 2rem;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  .skip-link,
  .wp-block-navigation,
  .wp-block-search,
  button {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000000;
    background: #ffffff;
  }
  
  a {
    text-decoration: underline;
    color: #000000;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
  }
}

/* ===================================
   RTL SUPPORT
   =================================== */

[dir="rtl"] .wp-block-navigation-item a {
  text-align: right;
}

[dir="rtl"] .has-text-align-left {
  text-align: right;
}

[dir="rtl"] .has-text-align-right {
  text-align: left;
}
