/* AC Pools Custom Styles - Matching Original */

/* Rotating Words Animation */
.rotating-word-container {
    display: inline-block;
    position: relative;
    min-width: 280px;
    height: 1.2em;
    vertical-align: middle;
}

.rotating-word {
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -0.6em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    white-space: nowrap;
}

.rotating-word.active {
    opacity: 1;
    transform: translateY(0);
}

.rotating-word.exit {
    opacity: 0;
    transform: translateY(-10px);
}

/* Before/After Comparison Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
}

.comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.comparison-after {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-before {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--position);
    height: 100%;
    overflow: hidden;
}

.comparison-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
}

.comparison-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.comparison-handle {
    position: absolute;
    top: 0;
    left: var(--position);
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.handle-line {
    flex: 1;
    width: 3px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.handle-circle {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: #00384d;
}

.comparison-label {
    position: absolute;
    top: 10px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.before-label {
    left: 10px;
}

.after-label {
    right: 10px;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Slow Bounce */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

/* Slide In Animation */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-in {
    animation: slideIn 0.6s ease forwards;
}

/* Fade In */
.fade-in {
    opacity: 0;
    animation: slideIn 0.8s ease forwards;
}

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

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

::-webkit-scrollbar-thumb {
    background: #00d0ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00384d;
}

/* Service Card Hover Effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 56, 77, 0.15);
}

/* Testimonial Card */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Focus States */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #00d0ff !important;
    box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.2);
}

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

/* Selection Color */
::selection {
    background: #00d0ff;
    color: #00384d;
}

/* Button Transitions */
button, a {
    transition: all 0.3s ease;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Shadow Utilities */
.shadow-primary {
    box-shadow: 0 10px 40px rgba(0, 208, 255, 0.3);
}

/* Image Hover Effects */
.img-hover {
    transition: transform 0.3s ease;
}

.img-hover:hover {
    transform: scale(1.05);
}

/* Pool Grid Background */
.pool-grid-bg {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.2) 2px, transparent 2px);
    background-size: 50px 50px;
}

/* =============================================
   Mobile Responsive Styles
   ============================================= */

/* Tablet adjustments */
@media (max-width: 1024px) {
    .animate-float {
        animation: none;
    }
    
    /* Grid adjustments for tablet */
    .grid.md\:grid-cols-3 {
        gap: 1.25rem;
    }
}

/* Tablet/Mobile breakpoint */
@media (max-width: 768px) {
    .rotating-word-container {
        min-width: 160px;
        height: 1.1em;
    }
    
    /* Mobile text adjustments - more refined sizing */
    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Mobile wave adjustments */
    svg[viewBox*="1440"] {
        height: auto !important;
    }
    
    /* Mobile section padding */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Mobile container padding */
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile grid gaps */
    .grid {
        gap: 1.5rem;
    }
    
    /* Mobile card padding */
    .bg-light-bg.rounded-2xl,
    .bg-light-bg.rounded-3xl,
    .bg-white.rounded-2xl,
    .bg-white.rounded-3xl {
        padding: 1.25rem;
    }
    
    /* Comparison slider mobile */
    .comparison-slider {
        aspect-ratio: 3/4;
    }
    
    /* Mobile feature lists */
    .space-y-4 {
        gap: 0.75rem;
    }
    
    /* Hide decorative elements on mobile for performance */
    .blur-3xl,
    .blur-xl {
        display: none;
    }
}

/* Small mobile breakpoint */
@media (max-width: 640px) {
    .rotating-word-container {
        min-width: auto;
        display: inline;
        height: auto;
    }
    
    .rotating-word {
        position: relative;
        display: none;
    }
    
    .rotating-word.active {
        display: inline;
    }
    
    /* Even smaller headings on small phones */
    h1 {
        font-size: 1.625rem !important;
        line-height: 1.25 !important;
    }
    
    h2 {
        font-size: 1.375rem !important;
    }
    
    /* Mobile button full width */
    .px-10,
    .px-8,
    .px-6 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Mobile stat section */
    .text-4xl.md\:text-5xl {
        font-size: 2rem !important;
    }
    
    /* Mobile grid single column */
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.sm\:grid-cols-2,
    .grid.sm\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats section mobile layout */
    .flex.flex-wrap.justify-center {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    /* Mobile form inputs */
    input, textarea, select {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Mobile section spacing */
    section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* Mobile badge sizing */
    .px-3.py-1 {
        padding: 0.375rem 0.625rem;
        font-size: 0.625rem;
    }
    
    /* Mobile icon containers */
    .w-16.h-16 {
        width: 3rem;
        height: 3rem;
    }
    
    .w-20.h-20 {
        width: 4rem;
        height: 4rem;
    }
    
    /* Mobile team grid */
    .grid.sm\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    /* Mobile team card */
    .w-32.h-32 {
        width: 5rem;
        height: 5rem;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    .rotating-word-container {
        min-width: 100px;
    }
    
    /* Extra tight padding on very small screens */
    .max-w-7xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Smaller buttons */
    button, .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile touch enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    /* Better touch scrolling */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .overflow-x-auto > * {
        scroll-snap-align: start;
    }
}

/* Form Styling */
input, textarea {
    font-family: 'Poppins', sans-serif;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Quick Quote Form Animations */
#nameField, #phoneField {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#nameField.hidden, #phoneField.hidden {
    display: none;
    opacity: 0;
    transform: translateX(-10px);
}

#nameField:not(.hidden), #phoneField:not(.hidden) {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Field slide-in animation from right */
@keyframes fieldSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-field-in {
    animation: fieldSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.font-handwriting {
    font-family: 'Poppins', sans-serif; /* Fallback or specific handwriting font if available */
}

/* Google Places Autocomplete Styling */
.pac-container {
    font-family: 'Poppins', sans-serif;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    padding: 8px 0;
    z-index: 9999 !important;
}

.pac-item {
    padding: 12px 16px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.2s ease;
}

.pac-item:hover {
    background: #eff7fa;
}

.pac-item-selected {
    background: #eff7fa;
}

.pac-icon {
    display: none;
}

.pac-item-query {
    font-size: 14px;
    font-weight: 500;
    color: #00384d;
}

.pac-matched {
    font-weight: 600;
    color: #00d0ff;
}

/* Hide Google branding */
.pac-logo:after {
    display: none;
}

/* =============================================
   Quiz Page Styles
   ============================================= */

/* Quiz Progress Bar */
.quiz-progress-bar {
    position: relative;
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.quiz-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, #00d0ff, #22d3ee);
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

/* Quiz Option Cards */
.quiz-option input:checked ~ div {
    border-color: #00d0ff;
    background: rgba(0, 208, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 208, 255, 0.15);
}

.quiz-option input:checked ~ div > div:last-child {
    border-color: #00d0ff;
    background: #00d0ff;
}

.quiz-option input:checked ~ div > div:last-child svg {
    opacity: 1;
}

.quiz-option input:checked ~ div > div:first-child {
    background: rgba(0, 208, 255, 0.2);
}

/* Quiz Animations */
@keyframes quiz-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes quiz-fade-in-up {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-fade-in {
    animation: quiz-fade-in 0.4s ease-out forwards;
}

.quiz-fade-in-up {
    opacity: 0;
    animation: quiz-fade-in-up 0.4s ease-out forwards;
}

/* Quiz Complete Page Animations */
@keyframes quiz-check-draw {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

@keyframes quiz-ping-slow {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes quiz-success-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes quiz-confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) translateX(var(--x));
        opacity: 0;
    }
}

.quiz-check-animate {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: quiz-check-draw 0.8s ease-out 0.3s forwards;
}

.quiz-ping-slow {
    animation: quiz-ping-slow 2s ease-out infinite;
}

.quiz-success-bounce {
    animation: quiz-success-bounce 0.6s ease-out;
}

/* Confetti styles */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -10px;
    background: #00d0ff;
    border-radius: 2px;
    animation: quiz-confetti-fall 4s ease-out var(--delay) forwards;
    transform: rotate(var(--rotation));
    opacity: 0.8;
}

.confetti:nth-child(even) {
    background: #00384d;
    width: 6px;
    height: 6px;
}

.confetti:nth-child(3n) {
    background: #06b6d4;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confetti:nth-child(5n) {
    background: #fbbf24;
    width: 7px;
    height: 7px;
}

/* Location Page Ripple Animation */
@keyframes ping-slow {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        opacity: 0.15;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.animate-ping-slow {
    animation: ping-slow 4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* =============================================
   Service Content Prose Styles
   ============================================= */

.service-content {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Headings */
.service-content h2 {
    color: #00384d;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.service-content h3 {
    color: #00384d;
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.service-content h4 {
    color: #00384d;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* First heading should not have top margin */
.service-content > h2:first-child,
.service-content > h3:first-child,
.service-content > h4:first-child {
    margin-top: 0;
}

/* Paragraphs */
.service-content p {
    margin-bottom: 1.25rem;
}

.service-content p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph (first paragraph) */
.service-content > p:first-of-type {
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.7;
}

/* Links */
.service-content a {
    color: #00d0ff;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.service-content a:hover {
    color: #00384d;
}

/* Unordered Lists */
.service-content ul {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

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

.service-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 8px;
    height: 8px;
    background: #00d0ff;
    border-radius: 50%;
}

/* Nested lists */
.service-content ul ul {
    margin: 0.5rem 0 0.5rem 0;
}

.service-content ul ul li::before {
    width: 6px;
    height: 6px;
    background: transparent;
    border: 2px solid #00d0ff;
}

/* Ordered Lists */
.service-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
    counter-reset: list-counter;
}

.service-content ol li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
    counter-increment: list-counter;
}

.service-content ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: #00d0ff;
    color: #00384d;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquote */
.service-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #eff7fa 0%, #e0f2fe 100%);
    border-left: 4px solid #00d0ff;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: #374151;
}

.service-content blockquote p {
    margin-bottom: 0;
}

.service-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    font-size: 0.875rem;
    color: #00384d;
}

.service-content blockquote cite::before {
    content: '— ';
}

/* Strong/Bold */
.service-content strong {
    color: #00384d;
    font-weight: 600;
}

/* Emphasis/Italic */
.service-content em {
    font-style: italic;
}

/* Horizontal Rule */
.service-content hr {
    margin: 2.5rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #00d0ff, transparent);
}

/* Code inline */
.service-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875em;
    color: #00384d;
    font-family: 'Fira Code', monospace;
}

/* Highlight/Mark */
.service-content mark {
    background: linear-gradient(120deg, #00d0ff40 0%, #00d0ff40 100%);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

/* Small text */
.service-content small {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Figure with caption */
.service-content figure {
    margin: 2rem 0;
}

.service-content figure img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 56, 77, 0.1);
}

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

/* Table styles */
.service-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 56, 77, 0.08);
}

.service-content thead {
    background: #00384d;
    color: white;
}

.service-content th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-content td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.service-content tbody tr:last-child td {
    border-bottom: none;
}

.service-content tbody tr:hover {
    background: #eff7fa;
}

/* Definition List */
.service-content dl {
    margin: 1.5rem 0;
}

.service-content dt {
    color: #00384d;
    font-weight: 600;
    margin-top: 1rem;
}

.service-content dt:first-child {
    margin-top: 0;
}

.service-content dd {
    margin-left: 0;
    padding-left: 1rem;
    border-left: 2px solid #00d0ff;
    margin-top: 0.25rem;
}

/* Callout/Note Box */
.service-content .note,
.service-content aside {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 1rem;
    color: #92400e;
}

.service-content .note strong:first-child,
.service-content aside strong:first-child {
    display: block;
    color: #b45309;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-content {
        font-size: 1rem;
    }
    
    .service-content h2 {
        font-size: 1.5rem;
    }
    
    .service-content h3 {
        font-size: 1.25rem;
    }
    
    .service-content > p:first-of-type {
        font-size: 1.125rem;
    }
    
    .service-content blockquote {
        padding: 1rem 1.25rem;
    }
    
    .service-content ol li {
        padding-left: 2.25rem;
    }
}





