/* Custom styles for Physiora landing page - Google Glass theme */

/* Booking Popup Animation */
#booking-popup {
    animation: fadeIn 0.3s ease-out;
}

#booking-popup .bg-white.rounded-2xl {
    animation: slideUp 0.3s ease-out;
}

/* Close button positioning - consistent on mobile and desktop */
#booking-popup .bg-white.rounded-xl button[class*="absolute"] {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    left: auto !important;
    z-index: 10 !important;
}

/* Ensure close button positioning on mobile */
@media (max-width: 768px) {
    #booking-popup .bg-white.rounded-xl button[class*="absolute"] {
        top: 0.5rem !important;
        right: 0.5rem !important;
        left: auto !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Prevent horizontal overflow */
* {
    max-width: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100vw;
    scroll-behavior: smooth;
}

/* Make navbar and footer logos render transparently over background colors */
img.header-logo,
img.footer-logo {
    background-color: transparent !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    display: block;
}

/* Glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* WhatsApp floating button animation */
.whatsapp-float {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Enhanced Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.7;
    color: #1f2937;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.5px;
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.875rem;
    }
}

/* Service card mobile tweaks: larger icons and better touch targets */
@media (max-width: 768px) {
    .glass-card .w-12,
    .glass-card .h-12 {
        width: 56px !important;
        height: 56px !important;
    }

    /* Make the "Learn more" links look like tappable buttons on mobile */
    .glass-card a.block {
        display: block !important;
        padding: 0.75rem 1rem !important;
        border-radius: 0.75rem !important;
        text-align: center !important;
        font-weight: 600 !important;
    }

    /* Slightly increase card padding for easier tapping */
    .glass-card {
        padding: 1rem !important;
    }
}

p {
    line-height: 1.8;
    letter-spacing: 0.2px;
}

/* Improved button typography */
button, .btn-primary {
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Link improvements */
a {
    transition: all 0.3s ease;
}

a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Image fallback styling */
.fallback-icon {
    background-color: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

/* Form focus states */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Core mobile adjustments */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    .glass-card {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    /* Ensure decorative blur elements don't cause horizontal scroll on mobile */
    .absolute {
        right: auto !important;
        left: auto !important;
        max-width: 100vw;
    }

    section {
        overflow: hidden;
    }

    /* Header improvements for mobile */
    header {
        padding: 0.25rem 0;
    }

    header .max-w-7xl {
        padding: 0 1rem;
    }

    /* Hero section mobile */
    section.relative:first-of-type h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        word-break: break-word;
    }

    /* Remove line breaks on mobile */
    br.hidden {
        display: none;
    }

    /* Improve button sizes on mobile */
    a[class*="px-8"][class*="py-4"] {
        padding: 1rem 1.5rem !important;
        font-size: 0.95rem;
        display: flex;
        width: 100%;
        justify-content: center;
    }

    /* CTA buttons full width on mobile */
    .flex.flex-col.sm\\:flex-row {
        flex-direction: column !important;
    }

    .flex.flex-col.sm\\:flex-row > * {
        width: 100%;
    }

    /* WhatsApp float button */
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    /* Scroll to top button adjustments */
    #scroll-to-top {
        width: 56px;
        height: 56px;
        bottom: 90px;
        right: 20px;
    }

    #scroll-to-top svg {
        width: 28px;
        height: 28px;
    }

    /* Service cards - stack better on mobile */
    .grid.grid-cols-1 {
        gap: 1rem;
    }

    .glass-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Accordion improvements for mobile */
    .accordion-header {
        padding: 1rem !important;
    }

    .accordion-header .flex.items-center {
        gap: 0.75rem;
    }

    .accordion-header h3 {
        font-size: 1rem;
    }

    .accordion-header p {
        font-size: 0.75rem;
    }

    /* Form improvements for mobile */
    input, textarea, select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }

    input:focus, textarea:focus {
        font-size: 16px;
    }

    /* Section padding for mobile */
    section {
        padding: 3rem 1rem !important;
    }

    section .max-w-7xl {
        padding: 0;
    }

    /* Text sizing for mobile */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Footer grid mobile */
    footer .grid.grid-cols-1 {
        gap: 2rem;
    }

    /* Testimonials padding */
    .glass-card blockquote {
        font-size: 0.95rem;
    }

    /* Team member images */
    img.w-24 {
        width: 80px !important;
        height: 80px !important;
    }

    /* Header spacing */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Mobile menu styling improvements */
    #mobile-menu {
        right: 0 !important;
        left: auto !important;
        width: 12rem;
        max-width: 100%;
        backdrop-filter: blur(10px);
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #mobile-menu.open {
        max-height: 400px;
    }

    #mobile-menu a {
        display: block;
        padding: 0.75rem 1rem;
    }

    /* Reduce animation motion for users who prefer less movement */
    @media (prefers-reduced-motion: reduce) {
        * {
            scroll-behavior: auto;
        }
    }
}

/* Loading animation for form submission */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hover effects for cards */
.glass-card:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Text gradient for headings */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth scrolling */
html, body {
    scroll-behavior: smooth;
}

/* Animation keyframes */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Enhanced glass card effects */
.glass-card {
    position: relative;
    transition: all 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover::before {
    opacity: 1;
}

/* Enhanced button styles with shimmer effect */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Mobile menu animations */
#mobile-menu {
    right: 0 !important;
    left: auto !important;
    width: 12rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 300px;
}

/* Enhanced testimonial styling */
blockquote {
    position: relative;
}

blockquote::before {
    content: '"';
    font-size: 4rem;
    color: rgba(59, 130, 246, 0.1);
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: Georgia, serif;
}

/* Trust indicators styling */
.trust-indicator {
    transition: transform 0.3s ease;
}

.trust-indicator:hover {
    transform: scale(1.05);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.focus-visible:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Enhanced section separators */
section {
    position: relative;
}

/* Animated gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Improved link hover states */
a:not(.glass-card) {
    text-decoration: none;
}

/* Icon animations */
svg {
    transition: transform 0.3s ease, filter 0.3s ease;
}

a:hover svg {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

/* Section background gradients */
.bg-gradient-to-b {
    background-attachment: fixed;
}

/* Prevent overflow from absolute positioned elements */
section {
    transition: all 0.5s ease;
    overflow: hidden;
}

/* Ensure decorative elements don't cause overflow */
section::before,
section::after {
    max-width: 100vw;
}

.absolute {
    max-width: 100%;
}

/* Form error states */
input.error, textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Input field enhancements */
input, textarea, select {
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

/* Success state for form inputs */
input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Accordion styles */
.service-accordion {
    transition: all 0.3s ease;
}

.accordion-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 10;
}

.accordion-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.accordion-icon {
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    flex-shrink: 0;
}

.accordion-content {
    transition: max-height 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.accordion-content.hidden {
    display: none;
}

/* Service list styling */
.accordion-content ul {
    margin: 0;
    padding: 0;
}

.accordion-content li {
    margin-bottom: 0.5rem;
}

/* Scroll to top button */
#scroll-to-top {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#scroll-to-top:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

#scroll-to-top:active {
    transform: scale(0.95);
}

/* Footer link animations */
footer a {
    text-decoration: none;
}

/* Print styles */
@media print {
    .whatsapp-float,
    #scroll-to-top,
    .no-print {
        display: none !important;
    }
}

/* Form error states */
input.error, textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Scroll to top button */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top:hover {
    transform: scale(1.1);
}

/* Print styles */
@media print {
    .whatsapp-float,
    #scroll-to-top,
    .no-print {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .whatsapp-float,
    .no-print {
        display: none !important;
    }
}
