/* Custom CSS Styles for Ophthalmologist Website - Minimalist Design */

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

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Söhne', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.7;
    color: #333;
}

/* Custom Button Styles */
.btn-navy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: #0a2a3d;
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #0a2a3d;
}

.btn-navy:hover {
    background-color: #0f3d56;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(10, 42, 61, 0.2);
}

.btn-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: #059669;
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #059669;
}

.btn-green:hover {
    background-color: #047857;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: transparent;
    color: #0a2a3d;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #0a2a3d;
}

.btn-outline:hover {
    background-color: #0a2a3d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(10, 42, 61, 0.2);
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: transparent;
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background-color: white;
    color: #0a2a3d;
    transform: translateY(-2px);
}

/* Navigation Links */
.nav-link-light {
    color: white;
    font-weight: 400;
    font-size: 14px;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.nav-link-light:hover {
    opacity: 1;
    color: #ff6b4a;
}

.nav-link-light.active {
    color: #ff6b4a;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background-color: rgba(10, 42, 61, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Service Cards - Minimal Style */
.service-card-minimal {
    padding: 0;
    background: transparent;
    transition: all 0.3s ease;
}

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

.service-card-minimal:hover .text-coral {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Service Description Line Clamping */
.service-description {
    cursor: pointer;
    position: relative;
    max-height: 7.5em; /* Approximately 5 lines */
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

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

.line-clamp-5::after {
    content: '...';
    position: absolute;
    right: 0;
    bottom: 0;
    padding-left: 1rem;
    background: linear-gradient(to right, transparent, #0a2a3d 50%);
    transition: opacity 0.2s ease;
}

/* Expanded state - remove line clamp */
.service-description.expanded {
    -webkit-line-clamp: unset;
    max-height: 1000px; /* Large enough to fit any content */
}

.service-description.expanded::after {
    opacity: 0;
    display: none;
}

/* Hover effect for descriptions */
.service-description:hover {
    opacity: 0.85;
}

/* Service Toggle Button */
.service-toggle {
    cursor: pointer;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-icon.rotate-180 {
    transform: rotate(180deg);
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Background Animation */
#home .absolute.inset-0 img {
    animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Hero Text Enhanced Visibility */
.hero-text-enhanced h1,
.hero-text-enhanced p,
.hero-text-enhanced .text-sm {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-text-enhanced h1 {
    font-weight: 400 !important;
    letter-spacing: -0.02em;
}

/* Enhanced gradient for better text contrast on light backgrounds */
#home .bg-gradient-to-r {
    background: linear-gradient(to right,
        rgba(10, 42, 61, 0.85) 0%,
        rgba(10, 42, 61, 0.70) 50%,
        rgba(10, 42, 61, 0.60) 100%
    );
}

/* Testimonial Quote Styling */
blockquote {
    position: relative;
    padding: 0 20px;
}

blockquote::before {
    content: '"';
    font-size: 120px;
    position: absolute;
    left: -20px;
    top: -40px;
    color: rgba(255, 107, 74, 0.2);
    font-family: Georgia, serif;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #ff6b4a;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    line-height: 1.2;
}

p {
    font-weight: 300;
}

/* Section Spacing */
section {
    position: relative;
}

/* Image Hover Effects */
img {
    transition: transform 0.5s ease;
}

.service-card-minimal:hover img {
    transform: scale(1.02);
}

/* Stats Circle Animation */
.w-64.h-64.bg-navy-900 {
    animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.3);
    }
    50% {
        box-shadow: 0 0 0 30px rgba(255, 107, 74, 0);
    }
}

/* Gradient Overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 42, 61, 0.8), rgba(255, 107, 74, 0.3));
    pointer-events: none;
}

/* Skip to Content Link (Accessibility) */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #ff6b4a;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 500;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid #0a2a3d;
    outline-offset: 2px;
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #ff6b4a;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Remove focus outline when not using keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Links Hover States */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Footer Link Hover */
footer a:hover {
    color: #ff6b4a !important;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    blockquote {
        font-size: 1.25rem !important;
        line-height: 1.6 !important;
        padding: 0 10px !important;
    }

    .btn-navy,
    .btn-green,
    .btn-outline,
    .btn-outline-white {
        width: 100%;
        justify-content: center;
    }

    .vision-controls-test {
        flex-direction: column;
        gap: 1rem;
    }

    .vision-controls-test button {
        width: 100% !important;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Glass Morphism for Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* Coral Accent Elements */
.accent-line {
    width: 60px;
    height: 2px;
    background: #ff6b4a;
    margin: 20px 0;
}

/* Map Overlay Card */
.absolute.bottom-8 {
    backdrop-filter: blur(10px);
}

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

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

/* Text Selection */
::selection {
    background-color: #ff6b4a;
    color: white;
}

::-moz-selection {
    background-color: #ff6b4a;
    color: white;
}

/* Smooth Page Transitions */
body {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    nav,
    footer,
    .btn-navy,
    .btn-outline,
    .btn-outline-white {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-navy,
    .btn-outline {
        border-width: 3px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Loading Skeleton States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 2em;
    margin-bottom: 1em;
    width: 80%;
}

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

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

/* Content loading state */
.content-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Page load animation */
body.loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a2a3d;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-icon {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff6b4a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Testimonial Carousel Styles */
.testimonial-carousel {
    position: relative;
    min-height: 400px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.testimonial-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.testimonial-dot.active {
    background-color: #ff6b4a;
    transform: scale(1.3);
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .testimonial-carousel {
        min-height: 500px;
    }
}

/* ===========================
   VISION TEST SECTION STYLES
   =========================== */

/* Vision Test Container */
.vision-test-container {
    position: relative;
    overflow: visible;
}

/* Indicators Row */
.vision-indicators-row {
    z-index: 10;
    pointer-events: none;
}

/* Chart Display Area */
.vision-chart-container {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e5e7eb;
}

.vision-chart {
    width: 100%;
    padding: 20px;
    transition: opacity 0.3s ease;
}

/* Vision Line Styles */
.vision-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1;
    animation: fadeIn 0.5s ease-in;
}

.vision-char {
    display: inline-block;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Indicators Styling */
#line-indicator {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
}

#vision-indicator {
    font-size: 0.875rem;
    color: #ff6b4a;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
}

/* Instruction Text */
#vision-instruction {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 4px;
}

.vision-instruction-bottom {
    pointer-events: none;
}

/* Control Buttons */
.vision-controls-initial,
.vision-controls-test {
    transition: all 0.3s ease;
}

.vision-controls-test.hidden,
.vision-controls-initial.hidden {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .vision-chart {
        padding: 10px;
    }

    .vision-chart-container {
        min-height: 280px !important;
    }

    .vision-line {
        gap: 0.2em;
    }

    #vision-instruction {
        font-size: 0.875rem !important;
        padding: 6px 10px;
    }

    #vision-indicator,
    #line-indicator {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .vision-indicators-row {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
    }

    .vision-instruction-bottom {
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }

    .btn-green,
    .btn-outline {
        padding: 12px 32px;
        font-size: 13px;
    }

    #vision-restart-btn {
        padding: 10px 24px;
        font-size: 12px;
    }
}

/* Smooth transitions for hiding/showing - only for specific elements */
#mobile-menu.hidden,
#lang-menu.hidden {
    display: none !important;
}

/* Vision Test Accessibility */
#vision-test button:focus-visible {
    outline: 3px solid #ff6b4a;
    outline-offset: 4px;
}

/* Chart Loading State */
.vision-chart.loading {
    opacity: 0.5;
    filter: blur(2px);
}

/* Completion State Styling */
#vision-instruction.complete {
    color: #059669;
    font-weight: 500;
}

/* Results Summary Styling */
.vision-results-summary {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.vision-results-summary h3 {
    line-height: 1.2;
}

.vision-results-summary .text-lg,
.vision-results-summary .text-xl {
    line-height: 1.3;
}

.results-details {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .vision-results-summary {
        padding: 0.5rem 0.5rem 0;
        padding-top: 1.5rem !important;
    }

    .vision-results-summary h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .vision-results-summary .text-base {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .results-details {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
}

.results-details::-webkit-scrollbar {
    width: 6px;
}

.results-details::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.results-details::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.results-details::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
