/**
 * SM Starter Theme - Custom Styles
 * 
 * Additional styles to complement Tailwind CSS
 * 
 * @package SM_Starter
 */

/* ==========================================================================
   Base Overrides
   ========================================================================== */

/* Ensure consistent box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove default margins */
body {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Headings consistency */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* ==========================================================================
   Navigation Dropdown Styles
   ========================================================================== */

.dropdown-menu {
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.dropdown-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Desktop dropdown hover trigger (optional) */
.dropdown-container:hover .dropdown-menu {
    /* Uncomment for hover trigger instead of click */
    /* opacity: 1;
    visibility: visible;
    transform: translateY(0); */
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

/* Input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Date input styling */
input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.service-card,
.blog-card,
.area-card {
    transition: all 0.3s ease;
}

.service-card:hover,
.blog-card:hover,
.area-card:hover {
    transform: translateY(-5px);
}

/* Image zoom on hover */
.card-image-zoom {
    overflow: hidden;
}

.card-image-zoom img {
    transition: transform 0.3s ease;
}

.card-image-zoom:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Scroll to Top Button
   ========================================================================== */

#scroll-top-btn {
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#scroll-top-btn:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#scroll-top-btn:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   Mobile Sticky CTA
   ========================================================================== */

.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0));
    padding-top: 2.5rem;
    pointer-events: none;
}

.mobile-sticky-cta a,
.mobile-sticky-cta button {
    pointer-events: auto;
}

@media (min-width: 768px) {
    .mobile-sticky-cta {
        display: none;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

/* Booking form glassmorphism */
.booking-form-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Stats Card Animation
   ========================================================================== */

.stats-card {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

/* ==========================================================================
   Section Backgrounds
   ========================================================================== */

.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 4rem;
    height: 2px;
    background-color: var(--sm-primary, #FFA500);
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* WordPress gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Aspect Ratios (CLS Prevention)
   ========================================================================== */

.aspect-hero {
    aspect-ratio: 16 / 9;
}

.aspect-service {
    aspect-ratio: 3 / 2;
}

.aspect-blog {
    aspect-ratio: 4 / 3;
}

.aspect-about {
    aspect-ratio: 3 / 4;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

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

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

/* ==========================================================================
   Line Clamp Utilities
   ========================================================================== */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   FAQ Accordion Styles
   ========================================================================== */

.faq-button {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */

.sm-contact-form .sm-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sm-contact-form .btn-loading {
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   Terms & Conditions Disclaimer
   ========================================================================== */

.sm-terms-disclaimer {
    margin-bottom: 0.5rem;
}

.sm-terms-disclaimer input[type="checkbox"] {
    accent-color: var(--sm-primary, #FFA500);
}

.sm-terms-disclaimer label:hover span {
    color: #374151;
}

/* Dark theme variant for forms on dark backgrounds */
.sm-terms-dark .sm-terms-disclaimer label span {
    color: #9CA3AF;
}

.sm-terms-dark .sm-terms-disclaimer label:hover span {
    color: #D1D5DB;
}

.sm-terms-dark .sm-terms-disclaimer .sm-terms-trigger {
    color: var(--sm-primary, #FFA500);
}

.sm-terms-dark .sm-terms-disclaimer .sm-terms-trigger:hover {
    color: var(--sm-secondary, #FF9800);
}

/* Terms Popover Modal */
.sm-terms-popover {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sm-terms-popover:not(.hidden) {
    opacity: 1;
}

.sm-terms-popover .sm-terms-overlay {
    cursor: pointer;
}

.sm-terms-popover .sm-terms-content {
    animation: popoverIn 0.25s ease-out;
}

@keyframes popoverIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.sm-terms-popover .prose ul {
    list-style-type: disc;
}

.sm-terms-popover .prose li {
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .sm-terms-popover .sm-terms-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .sm-terms-popover .sm-terms-content > div {
        padding: 1rem;
    }
}

/* ==========================================================================
   Google Map Container
   ========================================================================== */

.google-map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .mobile-sticky-cta,
    #scroll-top-btn,
    .mobile-menu,
    nav button,
    .sm-floating-widget {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

