/**
 * ShedBuilder Theme - Main Stylesheet
 *
 * Styles not covered by Tailwind CSS, including:
 * - Post/article content
 * - Hero gradient
 * - Swiper customizations
 * - Alpine.js [x-cloak]
 * - Custom animations
 * - Form overrides
 *
 * @package ShedBuilder
 */

/* ============================================
   ALPINE.JS - Hide elements until Alpine loads
   ============================================ */

[x-cloak] {
    display: none !important;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
}

.hero-gradient {
    background: linear-gradient(
        135deg,
        rgba(3, 7, 18, 0.85) 0%,
        rgba(3, 7, 18, 0.70) 40%,
        rgba(120, 53, 15, 0.40) 70%,
        rgba(3, 7, 18, 0.60) 100%
    );
}

/* ============================================
   POST CONTENT STYLES
   Styles for the_content() output
   ============================================ */

.post-content {
    color: #374151;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #fef3c7;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
}

.post-content p {
    margin-bottom: 1.25rem;
    color: #4b5563;
}

.post-content strong,
.post-content b {
    font-weight: 700;
    color: #111827;
}

.post-content em,
.post-content i {
    font-style: italic;
}

.post-content a {
    color: #d97706;
    text-decoration: underline;
    text-decoration-color: #fcd34d;
    text-underline-offset: 2px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.post-content a:hover {
    color: #b45309;
    text-decoration-color: #d97706;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content ul {
    list-style-type: none;
    padding-left: 0;
}

.post-content ul li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #d97706;
    border-radius: 50%;
    flex-shrink: 0;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.post-content blockquote {
    border-left: 4px solid #d97706;
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #92400e;
}

.post-content blockquote p {
    margin-bottom: 0;
    color: #92400e;
}

.post-content blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-style: normal;
    font-size: 0.875rem;
    font-weight: 600;
    color: #b45309;
}

.post-content code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
    color: #1f2937;
}

.post-content pre {
    background: #111827;
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #e5e7eb;
    font-size: 0.875rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.post-content th {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 0.625rem 0.875rem;
    font-weight: 700;
    text-align: left;
    color: #92400e;
}

.post-content td {
    border: 1px solid #e5e7eb;
    padding: 0.625rem 0.875rem;
    color: #4b5563;
}

.post-content tr:nth-child(even) td {
    background: #f9fafb;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-content figure {
    margin: 1.5rem 0;
}

.post-content figcaption {
    font-size: 0.875rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.post-content hr {
    border: none;
    border-top: 2px solid #f3f4f6;
    margin: 2rem 0;
}

/* WordPress Gutenberg Blocks */
.post-content .wp-block-quote {
    border-left: 4px solid #d97706;
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 1.5rem 0;
}

.post-content .wp-block-image figcaption {
    font-size: 0.875rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.post-content .wp-block-pullquote {
    border-top: 4px solid #d97706;
    border-bottom: 4px solid #d97706;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.post-content .wp-block-pullquote blockquote {
    border: none;
    background: none;
    padding: 0;
}

.post-content .wp-block-button .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #d97706;
    color: #fff !important;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-content .wp-block-button .wp-block-button__link:hover {
    background: #b45309;
}

/* Alignments */
.post-content .alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.post-content .alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.post-content .aligncenter {
    display: block;
    margin: 1.5rem auto;
    text-align: center;
}

.post-content .alignwide {
    max-width: 120%;
    margin-left: -10%;
}

/* ============================================
   SWIPER SLIDER CUSTOMIZATIONS
   ============================================ */

/* Reviews Slider */
.reviews-swiper {
    padding-bottom: 50px !important;
    position: relative;
}

.reviews-swiper .swiper-slide {
    height: auto;
}

.reviews-swiper .swiper-pagination {
    bottom: 0;
}

.reviews-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
}

.reviews-swiper .swiper-pagination-bullet-active {
    background: #d97706;
    width: 24px;
    border-radius: 4px;
}

.swiper-button-prev,
.swiper-button-next {
    width: 40px !important;
    height: 40px !important;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: all 0.2s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #d97706;
    border-color: #d97706;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 14px !important;
    font-weight: 700;
    color: #6b7280;
}

.swiper-button-prev:hover::after,
.swiper-button-next:hover::after {
    color: white;
}

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

/* Ensure smooth logo transition */
.site-header .custom-logo-link img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Active nav item */
.site-header .current-menu-item a,
.site-header .current-menu-ancestor a {
    color: #d97706 !important;
}

/* ============================================
   SEARCH FORM
   ============================================ */

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    color: #111827;
    background: white;
    transition: border-color 0.15s ease;
    outline: none;
}

.search-form .search-field:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.search-form .search-submit {
    padding: 0.75rem 1.25rem;
    background: #d97706;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.search-form .search-submit:hover {
    background: #b45309;
}

/* ============================================
   PAGINATION
   ============================================ */

.page-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

nav.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
}

nav.pagination .page-numbers:hover {
    border-color: #fcd34d;
    color: #d97706;
    background: #fffbeb;
}

nav.pagination .page-numbers.current {
    background: #d97706;
    border-color: #d97706;
    color: white;
}

nav.pagination .page-numbers.dots {
    border: none;
    background: none;
    color: #9ca3af;
}

/* ============================================
   COMMENTS
   ============================================ */

#comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#comments .comment-list > li + li {
    margin-top: 1.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    color: #111827;
    background: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* ============================================
   CALENDAR (WP Widget)
   ============================================ */

.widget .calendar_wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.widget .calendar_wrap th,
.widget .calendar_wrap td {
    padding: 0.25rem;
    text-align: center;
}

.widget .calendar_wrap td a {
    color: #d97706;
    font-weight: 600;
}

.widget .calendar_wrap .wp-calendar-nav {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

/* ============================================
   CUSTOM ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(217, 119, 6, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease both;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease both;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease both;
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Stagger delays for animation sequences */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* ============================================
   SMOOTH SCROLL OFFSET
   (for fixed header)
   ============================================ */

html {
    scroll-padding-top: 80px;
}

@media (min-width: 1024px) {
    html {
        scroll-padding-top: 100px;
    }
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */

:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   SKIP TO CONTENT LINK (Accessibility)
   ============================================ */

.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    background: #d97706;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
    top: 0;
    left: 0;
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        #f3f4f6 25%,
        #e5e7eb 50%,
        #f3f4f6 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   RESPONSIVE VIDEO EMBEDS
   ============================================ */

.wp-block-embed__wrapper,
.post-content .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.wp-block-embed__wrapper iframe,
.post-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
}

/* ============================================
   CUSTOM LOGO
   ============================================ */

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

.custom-logo {
    max-height: 48px;
    width: auto;
}

/* ============================================
   WIDGET STYLES
   ============================================ */

.widget {
    font-size: 0.9375rem;
}

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

.widget ul li {
    padding: 0.375rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.widget ul li a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s ease;
}

.widget ul li a:hover {
    color: #d97706;
}

/* ============================================
   GALLERY GRID (WordPress Gallery Block)
   ============================================ */

.wp-block-gallery {
    margin: 1.5rem 0;
}

.wp-block-gallery .wp-block-image img {
    border-radius: 0.5rem;
}

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

@media print {
    .site-header,
    .site-footer,
    #booking,
    #calculator,
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }

    .post-content {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.75em;
        color: #666;
    }
}
