/*
Theme Name: TQCSI Custom
Theme URI: https://tqcsi-ph.com
Author: Kirk Dev
Author URI: https://kirk-dev.vercel.app
Description: Custom theme for TQCSI, responsive and modern using TailwindCSS.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://tqcsi-ph.com
Text Domain: tqcsi-custom
Tags: custom, tailwindcss, responsive
*/

/* Override TailwindCSS and match WordPress editor exactly */
.prose {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.6 !important;
  color: #333 !important;
  max-width: none !important;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-weight: 600 !important;
  line-height: 1.25 !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.5em !important;
  color: #333 !important;
}

.prose h1 {
  font-size: 2em !important;
}

.prose h2 {
  font-size: 1.5em !important;
}

.prose h3 {
  font-size: 1.17em !important;
}

.prose p {
  margin-bottom: 1em !important;
  line-height: 1.6 !important;
  color: #333 !important;
}

.prose ul, .prose ol {
  margin-bottom: 0.5em !important;
  padding-left: 1.5em !important;
  list-style: disc !important;
}

.prose li {
  margin-bottom: 0.25em !important;
  color: #333 !important;
  display: list-item !important;
  list-style: inherit !important;
}

.prose ul li {
  list-style-type: disc !important;
}

.prose ol li {
  list-style-type: decimal !important;
}

.prose blockquote {
  border-left: 4px solid #e5e7eb !important;
  padding-left: 1em !important;
  margin: 1.5em 0 !important;
  font-style: italic !important;
  color: #6b7280 !important;
}

.prose a {
  color: #0073aa !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-weight: normal !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: inherit !important;
  display: inline !important;
}

/* Ensure links in paragraphs stay inline */
.prose p a {
  display: inline !important;
  flex: none !important;
  flex-direction: unset !important;
  align-items: unset !important;
  justify-content: unset !important;
}

.prose a:hover {
  color: #005a87 !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Remove all ::before and ::after pseudo-elements */
.prose a:before,
.prose a:after,
.prose *:before,
.prose *:after {
  display: none !important;
  content: none !important;
}

/* Remove inline styles from all elements */
.prose * {
  font-family: inherit !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Remove all SVG elements */
.prose svg,
.prose a svg,
.prose * svg {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* WordPress blocks styling */
.prose .wp-block-image {
  margin: 1.5em 0 !important;
}

.prose .wp-block-image img {
  max-width: 100% !important;
  height: auto !important;
}

.prose .wp-block-embed {
  margin: 1.5em 0 !important;
}

.prose .wp-block-quote {
  border-left: 4px solid #e5e7eb !important;
  padding-left: 1em !important;
  margin: 1.5em 0 !important;
  font-style: italic !important;
  color: #6b7280 !important;
}

/* Table styling to match training calendar */
.prose table,
.wp-block-table table,
table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 1.5em 0 !important;
  border: 1px solid #ddd !important;
}

.prose table th,
.wp-block-table table th,
table th {
  background: #f5f5f5 !important;
  color: #333 !important;
  font-weight: bold !important;
  padding: 12px 16px !important;
  text-align: left !important;
  border: 1px solid #ddd !important;
}

.prose table td,
.wp-block-table table td,
table td {
  padding: 12px 16px !important;
  border: 1px solid #ddd !important;
  text-align: left !important;
  vertical-align: top !important;
}

/* First row (header) should always be light gray - only for non-empty headers */
.prose table thead tr th:not(:empty),
.wp-block-table table thead tr th:not(:empty),
table thead tr th:not(:empty),
.prose table tr:first-child th:not(:empty),
.wp-block-table table tr:first-child th:not(:empty),
table tr:first-child th:not(:empty) {
  background: #f5f5f5 !important;
}

/* Hide empty header cells completely */
.prose table th:empty,
.wp-block-table table th:empty,
table th:empty {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Alternating row colors - only for data rows, not header */
.prose table tbody tr:nth-child(even) td,
.wp-block-table table tbody tr:nth-child(even) td,
table tbody tr:nth-child(even) td {
  background: #f9f9f9 !important;
}

.prose table tbody tr:nth-child(odd) td,
.wp-block-table table tbody tr:nth-child(odd) td,
table tbody tr:nth-child(odd) td {
  background: white !important;
}

/* Ensure empty rows don't get styling */
.prose table tr:empty,
.wp-block-table table tr:empty,
table tr:empty {
  display: none !important;
}

/* Cost column alignment */
.prose table td:nth-child(3),
.wp-block-table table td:nth-child(3),
table td:nth-child(3) {
  text-align: left !important;
}

/* Ensure table links work properly */
.prose table a,
.wp-block-table table a,
table a {
  color: #0073aa !important;
  text-decoration: underline !important;
  display: inline !important;
}

/* Form input styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem 0.75rem !important;
  background-color: white !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Specific textarea styling to ensure borders */
textarea,
.wp-block-textarea textarea,
.prose textarea,
form textarea {
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem 0.75rem !important;
  background-color: white !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  width: 100% !important;
  min-height: 100px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Button styling */
input[type="submit"],
button[type="submit"],
.submit-button {
  background-color: #3b82f6 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  border: 1px solid #3b82f6 !important;
  border-radius: 0.375rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.submit-button:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

/* Remove any TailwindCSS overrides */
.prose * {
  font-family: inherit !important;
}

/* Ensure proper spacing */
.prose > *:first-child {
  margin-top: 0 !important;
}

.prose > *:last-child {
  margin-bottom: 0 !important;
}

/* Programs Carousel Styles */
.standard-card {
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 200px;
}

.standard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.standard-card a {
  text-decoration: none !important;
  color: inherit !important;
}

.standard-card a:hover {
  text-decoration: none !important;
}

/* Splide Carousel Custom Styles */
.splide__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #1d4ed8 !important;
  color: white !important;
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.splide__arrow:hover {
  background: #1e40af !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.splide__arrow--prev {
  left: -60px;
}

.splide__arrow--next {
  right: -60px;
}

.splide__arrow:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

.splide__track {
  overflow: hidden;
  position: relative;
}

.splide__list {
  display: flex;
  transition: transform 0.5s ease;
}

.splide__slide {
  flex-shrink: 0;
  position: relative;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
  .splide__arrow--prev {
    left: -40px;
  }
  
  .splide__arrow--next {
    right: -40px;
  }
  
  .splide__arrow {
    width: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 480px) {
  .splide__arrow--prev {
    left: -30px;
  }
  
  .splide__arrow--next {
    right: -30px;
  }
  
  .splide__arrow {
    width: 36px !important;
    height: 36px !important;
  }
  
  .standard-card {
    min-height: 180px;
  }
}
