/*
Theme Name: Schafler Premium Standalone
Theme URI: https://schaflertours.com
Author: Antigravity AI
Description: Block theme for schafler Tours, converted from React/Next.js and styled with Tailwind CSS
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schafler-tours-theme
*/
/* Theme styles */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.taxonomy-tour_language {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.taxonomy-tour_language a {
  padding: 0.125rem 0.5rem;
  background-color: rgba(212, 175, 55, 0.05); /* accent/5 */
  color: var(--color-primary, #0A192F); /* primary */
  font-size: 10px;
  font-weight: 900;
  border-radius: 0.25rem;
  border: 1px solid rgba(10, 25, 47, 0.05);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}
.taxonomy-tour_language .wp-block-post-terms__separator {
  display: none;
}

.taxonomy-duration {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--color-primary, #0A192F);
  text-transform: uppercase;
  letter-spacing: -0.05em;
}
.taxonomy-duration a {
  color: inherit;
  text-decoration: none;
}

/* --- OVERRIDES FOR GUTENBERG DEFAULTS --- */

/* 1. Fix WordPress featured image aspect ratios to respect Tailwind w-full h-full object-cover */
.wp-block-post-featured-image img,
figure.wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0;
    left: 0;
}

/* 2. Fix global theme.json link color overriding Tailwind button text colors */
a.bg-primary { color: #ffffff !important; }
a.bg-secondary { color: #1B4332 !important; }
a.bg-white { color: #2D6A4F !important; }
button.bg-secondary { color: #1B4332 !important; }

/* 3. Ensure Tailwind grid works on Query block */
.wp-block-query.grid {
    display: grid !important;
}

/* 4. Force grid on inner FSE list for query loops */
.wp-block-query > ul.wp-block-post-template {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
    gap: 2.5rem !important; /* fallback gap */
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
@media (min-width: 640px) {
    .wp-block-query.sm\:grid-cols-2 > ul.wp-block-post-template,
    .wp-block-query.md\:grid-cols-2 > ul.wp-block-post-template,
    .wp-block-query.md\:grid-cols-3 > ul.wp-block-post-template,
    .wp-block-query.lg\:grid-cols-3 > ul.wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 768px) {
    .wp-block-query.md\:grid-cols-3 > ul.wp-block-post-template {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 1024px) {
    .wp-block-query.lg\:grid-cols-3 > ul.wp-block-post-template,
    .wp-block-query:not(.grid-cols-1):not(.md\:grid-cols-2) > ul.wp-block-post-template {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Map Tailwind gap classes to the inner list */
.wp-block-query.gap-6 > ul.wp-block-post-template { gap: 1.5rem !important; }
.wp-block-query.gap-8 > ul.wp-block-post-template { gap: 2rem !important; }
.wp-block-query.gap-10 > ul.wp-block-post-template { gap: 2.5rem !important; }

/* 5. Remove default margin from root groups to fix section spacing */
.wp-site-blocks > .wp-block-group {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 6. Enforce button text color globally against FSE overrides */
.bg-primary { color: #ffffff !important; }
.bg-primary span { color: #ffffff !important; }
.bg-primary p { color: #ffffff !important; }
.bg-primary h2, .bg-primary h3, .bg-primary h4 { color: #ffffff !important; }
.bg-secondary { color: var(--color-primary, #0A192F) !important; }
.bg-secondary span { color: var(--color-primary, #0A192F) !important; }



.decoration-none { text-decoration: none !important; }
.no-underline { text-decoration: none !important; }

.animate-fade-in { 
    animation: fadeIn 0.8s ease-out forwards; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}


.transition-all { transition: all 0.3s ease-in-out !important; }
.duration-300 { transition-duration: 300ms !important; }
.hover\:-translate-y-2:hover { transform: translateY(-0.5rem) !important; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }

/* Admin Bar Fix */
.admin-bar .fixed.top-0 {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar .fixed.top-0 {
        top: 46px !important;
    }
}

/* Custom Interaction Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes whatsapp-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-pulse {
    animation: whatsapp-pulse 2s infinite;
}
.whatsapp-pulse:hover {
    animation: none;
    transform: scale(1.1);
}

/* Core overrides to resolve aspect ratio gaps and default figure styles */
img.object-cover,
.object-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

figure.w-full,
figure.size-full {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Rating Stars Yellow Color Override */
.text-yellow-stars,
.text-\[\#FFC107\] {
    color: #FFC107 !important;
}

