/* Premium Luxury Styles for Integrity Pools */

/* Sticky Header */
.sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100% !important;
}

/* Ensure header is visible */
nav.sticky-header {
    display: block !important;
    visibility: visible !important;
}

/* Add padding to body to account for fixed header */
body.has-sticky-header {
    padding-top: 80px !important;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform-origin: top;
}

.dropdown-menu.hidden {
    opacity: 0;
    transform: scaleY(0.95);
    pointer-events: none;
}

.dropdown button svg {
    transition: transform 0.2s ease-in-out;
}

.mobile-dropdown svg {
    transition: transform 0.2s ease-in-out;
}

/* Touch-friendly mobile menu button */
#mobile-menu-button {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* Ensure mobile menu is touch-friendly */
#mobile-menu {
    touch-action: manipulation !important;
}

#mobile-menu a {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    touch-action: manipulation !important;
}

/* Modern Logo-Inspired Color Palette */
:root {
    --primary-blue: #0066CC;
    --secondary-blue: #004499;
    --accent-turquoise: #40E0D0;
    --light-blue: #87CEEB;
    --dark-navy: #001A33;
    --modern-white: #FFFFFF;
    --soft-grey: #F8FAFC;
    --medium-grey: #64748B;
    --dark-grey: #334155;
    --teal-accent: #0891B2;
}

/* Modern Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Base Typography & Layout */
@layer base {
    body {
        font-family: 'Inter', sans-serif;
        color: var(--dark-grey);
        background-color: var(--modern-white);
        line-height: 1.6;
        letter-spacing: -0.02em;
    }
    
    h1, h2, h3 {
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 600;
        color: var(--dark-navy);
        letter-spacing: -0.03em;
    }
    
    h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        line-height: 1.1;
        font-weight: 700;
    }
    
    h2 {
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.2;
    }
    
    h3 {
        font-size: clamp(1.5rem, 3vw, 2rem);
        line-height: 1.3;
    }
    
    p {
        font-size: 1.125rem;
        color: var(--medium-grey);
        font-weight: 400;
    }
}

@layer components {
    /* Modern Button Styles */
    .btn-primary {
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--teal-accent) 100%);
        color: white !important;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        letter-spacing: 0.025em;
        padding: 1.25rem 2.5rem;
        border-radius: 0.75rem;
        border: none;
        box-shadow: 0 8px 25px rgba(0, 102, 204, 0.25);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 1.125rem;
        text-decoration: none;
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(0, 102, 204, 0.35);
        background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    }
    
    .btn-secondary {
        background: transparent;
        color: white;
        border: 2px solid white;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        letter-spacing: 0.025em;
        padding: 1.25rem 2.5rem;
        border-radius: 0.75rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 1.125rem;
    }
    
    .btn-secondary:hover {
        background: white;
        color: var(--primary-blue);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(255, 255, 255, 0.25);
    }
    
    /* Modern Card Components */
    .luxury-card {
        background: white;
        border-radius: 1.5rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(100, 116, 139, 0.1);
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .luxury-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
        border-color: rgba(0, 102, 204, 0.2);
    }
    
    /* Modern Section Backgrounds */
    .luxury-section {
        background: linear-gradient(135deg, var(--soft-grey) 0%, white 100%);
    }
    
    .premium-accent {
        background: linear-gradient(135deg, var(--dark-navy) 0%, var(--secondary-blue) 100%);
        color: white;
    }
    
    /* Modern Divider */
    .gold-divider {
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, var(--accent-turquoise), var(--primary-blue));
        border-radius: 2px;
        margin: 1.5rem auto;
    }
    
    /* Modern Navigation */
    .premium-nav {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    }
    
    /* Modern Hero Section */
    .premium-hero {
        background: linear-gradient(135deg, rgba(0, 26, 51, 0.85) 0%, rgba(0, 68, 153, 0.75) 100%);
    }
    
    /* Floating Call Button */
    .floating-call-button {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .floating-call-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--teal-accent) 100%);
        color: white;
        text-decoration: none;
        padding: 1rem 1.5rem;
        border-radius: 3rem;
        box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 600;
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .floating-call-link:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 15px 35px rgba(0, 102, 204, 0.4);
        background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    }
    
    .floating-call-icon {
        width: 1.25rem;
        height: 1.25rem;
        flex-shrink: 0;
    }
    
    .floating-call-text {
        font-family: 'Inter', sans-serif;
    }
    
    /* Mobile responsive adjustments */
    @media (max-width: 640px) {
        .floating-call-button {
            bottom: 1.5rem;
            right: 1.5rem;
        }
        
        .floating-call-link {
            padding: 0.875rem 1.25rem;
            font-size: 0.9rem;
        }
        
        .floating-call-icon {
            width: 1.125rem;
            height: 1.125rem;
        }
    }
    
    /* Hide text on very small screens, show icon only */
    @media (max-width: 480px) {
        .floating-call-text {
            display: none;
        }
        
        .floating-call-link {
            padding: 1rem;
            border-radius: 50%;
        }
    }
    
    /* Modern Text Styles */
    .premium-text {
        color: var(--medium-grey);
        font-weight: 400;
        line-height: 1.7;
    }
    
    .accent-text {
        color: var(--accent-turquoise);
        font-weight: 600;
    }
    
    /* Modern Inputs */
    .premium-input {
        border: 2px solid rgba(100, 116, 139, 0.2);
        border-radius: 0.75rem;
        padding: 1rem;
        font-family: 'Inter', sans-serif;
        transition: all 0.3s ease;
        background: white;
    }
    
    .premium-input:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        outline: none;
    }
}

/* Mobile Responsiveness Enhancements */
@media (max-width: 768px) {
    /* Pool size tabs - better mobile layout */
    .flex.flex-wrap.gap-1 {
        gap: 0.5rem;
    }
    
    .flex.flex-wrap.gap-1 button {
        flex: 1;
        min-width: 120px;
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }
    
    /* Hero section text scaling */
    .text-5xl.md\\:text-7xl {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    /* Pool diagrams - ensure they fit on mobile */
    .min-h-80 img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Gallery grids - better mobile spacing */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        gap: 1rem;
    }
    
    /* Contact forms - full width on mobile */
    .premium-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Service areas grid - 2 columns max on mobile */
    .grid.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Very small screens - single column layout */
    .grid.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-5 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    /* Pool size tabs - stack vertically on very small screens */
    .flex.flex-wrap.gap-1 {
        flex-direction: column;
    }
    
    .flex.flex-wrap.gap-1 button {
        width: 100%;
        min-width: auto;
    }
    
    /* Reduce padding on small screens */
    .px-4.sm\\:px-6.lg\\:px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hero section - smaller text on very small screens */
    .text-5xl.md\\:text-7xl {
        font-size: 2rem !important;
    }
    
    .text-xl.md\\:text-2xl {
        font-size: 1.125rem !important;
    }
}

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
    button, .btn-primary, .color-option, .size-tab {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .hover\\:bg-gray-300:hover {
        background-color: inherit;
    }
    
    .hover\\:text-blue-600:hover {
        color: inherit;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

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

/* Lazy loading images */
.lazy-image {
    transition: opacity 0.3s;
}

.lazy-image[data-loaded="false"] {
    opacity: 0;
}

.lazy-image[data-loaded="true"] {
    opacity: 1;
}

/* Gallery filter transitions */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* FAQ accordion */
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* Mobile menu animation */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease-in;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Sticky header shadow */
.header-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

/* Logo styling */
.logo-text {
    font-family: 'Times New Roman', serif;
    color: #1B3B6E;
    font-weight: bold;
}

/* Footer styling */
.footer-ribbon {
    font-variant: small-caps;
    letter-spacing: 0.05em;
}