/* Base styles */
body {
    font-family: 'DM Sans', sans-serif;
    color: #1C2B2B;
    background-color: #fbfbfb;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
}

/* Subtle texture overlay */
.texture-overlay {
    position: relative;
}

.texture-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Typewriter animation */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #15acac;
    }
}

@keyframes removeCursor {
    to {
        border-color: transparent;
    }
}

/* First line: cursor while typing, then disappears */
.typewriter-line-1 {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid transparent;
    width: 0;
}

/* Second line: cursor while typing, then disappears */
.typewriter-line-2 {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid transparent;
    width: 0;
}

/* Third line: cursor while typing, blinks for a few seconds, then stops and fades */
.typewriter-line-3 {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid transparent;
    width: 0;
}

/* Hide animated elements before animation starts */
.animate-fade-in-up {
    opacity: 0;
}

/* Trust bar items hidden until scrolled into view */
.trust-bar-item {
    opacity: 0;
    transform: translateY(30px);
    transition: none;
}

.trust-bar-item.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.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;
}

.animate-delay-600 {
    animation-delay: 0.6s;
}

/* Navigation underline animation */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #15acac;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(28, 43, 43, 0.12);
    border-color: rgba(21, 172, 172, 0.3);
}

.card-hover svg {
    transition: transform 0.3s ease;
}

.card-hover:hover svg {
    transform: scale(1.1);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(21, 172, 172, 0.3);
}

/* Soft shadows */
.soft-shadow {
    box-shadow: 0 1px 3px rgba(28, 43, 43, 0.06),
                0 8px 24px rgba(28, 43, 43, 0.04);
}

/* Large quotation marks */
.quote::before {
    content: '\201C';
    font-family: 'Fraunces', serif;
    font-size: 4rem;
    line-height: 1;
    color: #15acac;
    opacity: 0.3;
    position: absolute;
    left: -0.5rem;
    top: -1rem;
}

.quote {
    position: relative;
    padding-left: 2rem;
}

/* Section number backgrounds */
.section-number {
    position: absolute;
    font-family: 'Fraunces', serif;
    font-size: 14rem;
    font-weight: 700;
    color: rgba(237, 245, 245, 0.7);
    z-index: 0;
    user-select: none;
    pointer-events: none;
}

/* Icon styles */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-large {
    width: 48px;
    height: 48px;
    stroke-width: 2px;
}

.icon-medium {
    width: 40px;
    height: 40px;
    stroke-width: 2px;
}

.icon-small {
    width: 32px;
    height: 32px;
    stroke-width: 2px;
}

.icon-tiny {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

/* Icon animations */
@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-icon-in {
    animation: iconFadeIn 0.6s ease both;
}


/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #15acac, #5CC8C8);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Featured testimonial */
.featured-testimonial {
    background: linear-gradient(135deg, #15acac 0%, #0E8787 100%);
    color: #fbfbfb;
}

.featured-testimonial .quote::before {
    color: rgba(250, 248, 245, 0.3);
}

/* Featured testimonial read more */
.featured-read-more-btn svg {
    transition: transform 0.2s ease;
}

.featured-read-more-btn.expanded svg {
    transform: rotate(180deg);
}

/* Decorative background patterns */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(21, 172, 172, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Mobile menu */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

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

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

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

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

/* Testimonial cards */
.testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Testimonial text truncation */
.testimonial-text {
    position: relative;
    transition: max-height 0.4s ease;
}

.testimonial-text.truncated {
    max-height: 7.2em; /* ~4 lines */
    overflow: hidden;
}

.testimonial-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2.4em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 50%, white);
    pointer-events: none;
}

.testimonial-text.expanded {
    max-height: none;
}

.testimonial-text.expanded::after {
    display: none;
}

/* Read more/less button */
.read-more-btn {
    color: #15acac;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    color: #0E8787;
}

.read-more-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.read-more-btn.expanded svg {
    transform: rotate(180deg);
}

/* Hidden testimonials */
#hidden-testimonials {
    display: none;
}

#hidden-testimonials.revealing {
    display: contents;
}

/* Load more button hidden state */
#load-more-container.hidden {
    display: none;
}

/* Fade in animation for newly loaded testimonials */
.testimonial-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #15acac;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(21, 172, 172, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: #0E8787;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(21, 172, 172, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top svg {
    color: #fbfbfb;
    stroke-width: 2.5px;
}

/* Mobile adjustments for scroll to top */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
}

/* Contact form styles */
form input[type="text"],
form input[type="email"],
form textarea {
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
}

form input[type="text"]::placeholder,
form input[type="email"]::placeholder,
form textarea::placeholder {
    color: rgba(107, 101, 96, 0.5);
}

form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Contact section refinements */
.border-l-3 {
    border-left-width: 3px;
}

#reveal-email {
    cursor: pointer;
}

#reveal-email:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Content page styles */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.content-page h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.content-page h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #15acac;
}

.content-page h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-page p,
.content-page li {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-page ul,
.content-page ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-page strong {
    font-weight: 600;
    color: #1C2B2B;
}

.content-page a {
    color: #15acac;
    text-decoration: underline;
}

.content-page a:hover {
    color: #0E8787;
}

/* Form Modal */
.form-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.form-modal.active {
    display: flex;
}

.form-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(28, 43, 43, 0.75);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.form-modal-content {
    position: relative;
    background-color: #fbfbfb;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(28, 43, 43, 0.3);
    max-width: 500px;
    width: 100%;
    animation: modalSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
}

.form-modal-body {
    padding: 3rem 2rem 2rem;
}

.form-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #5F6E6E;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-modal-close:hover {
    background-color: rgba(21, 172, 172, 0.1);
    color: #15acac;
}

.success-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.success-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #15acac 0%, #0E8787 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 24px rgba(21, 172, 172, 0.4);
}

/* Error Message */
.form-error-message {
    background-color: #FEE;
    border: 1px solid #FCC;
    border-left: 4px solid #DC2626;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.form-error-message.hidden {
    display: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(250, 248, 245, 0.3);
    border-top-color: #fbfbfb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Animations */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .form-modal-body {
        padding: 2rem 1.5rem 1.5rem;
    }
    .success-icon-circle {
        width: 64px;
        height: 64px;
    }
}
