/* ========================================
   AK TCM - Custom Styles
   Klasyczna Medycyna Chińska
   ======================================== */

/* CSS Custom Properties (Variables) */
:root {
    --color-tea-beige: #E8E2D6;
    --color-warm-beige: #F5F1EA;
    --color-ink-graphite: #2F2F2D;
    --color-jade-green: #4F6F64;
    --color-warm-earth: #C7B299;
    --color-muted-bamboo: #9DAA9B;
    --color-muted-ochre: #B36A3D;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    --font-elegant: 'Cormorant Garamond', Georgia, serif;
    --font-handwritten: 'Italianno', cursive;

    --transition-base: 0.3s ease;
    --spacing-section: 5rem;
    --spacing-mobile: 3rem;
}

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-ink-graphite);
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-handwritten);
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 3.5rem;
}

h3 {
    font-size: 2.5rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background-color: transparent;
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background-color: var(--color-tea-beige);
    box-shadow: 0 2px 10px rgba(47, 47, 45, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: var(--color-ink-graphite);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-logo {
    height: 50px;
    margin-right: 0.75rem;
}

.brand-text {
    font-family: 'Monsieur La Doulaise', cursive;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-ink-graphite);
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
    color: var(--color-ink-graphite);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: var(--transition-base);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--color-muted-ochre);
}

.navbar-toggler {
    border: 2px solid var(--color-jade-green);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 3px solid var(--color-jade-green);
    outline-offset: 2px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234F6F64' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/bg_1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 1rem 4rem;
    position: relative;
}

/* Fallback for browsers without WebP support */
.no-webp .hero-section {
    background-image: url('../img/bg_1.png');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(232, 226, 214, 0.65);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 400px;
    height: auto;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-handwritten);
    font-size: 5rem;
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-subtitle {
    font-family: var(--font-handwritten);
    font-size: 3rem;
    font-weight: 400;
    color: var(--color-ink-graphite);
    margin-bottom: 3rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.scroll-indicator {
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.scroll-link {
    color: var(--color-jade-green);
    font-size: 2rem;
    transition: var(--transition-base);
    display: inline-block;
}

.scroll-link:hover {
    color: var(--color-muted-ochre);
    transform: translateY(5px);
}

.scroll-link i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ========================================
   Sections
   ======================================== */

section {
    padding: var(--spacing-section) 0;
}

.section-white {
    background-color: #ffffff;
}

.section-warm-beige {
    background-color: var(--color-warm-beige);
}

.section-beige {
    background-color: var(--color-tea-beige);
}

.section-location {
    background-color: #F5F1EA;
}

.section-heading {
    font-family: var(--font-handwritten);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-divider {
    width: 60px;
    height: 3px;
    background-color: var(--color-jade-green);
    margin: 1.5rem 0 2rem;
}

.section-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-ink-graphite);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.section-image {
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Service Cards
   ======================================== */

.service-card {
    background: linear-gradient(135deg, #FAF7F2 0%, #F5EFE6 50%, #EDE7DC 100%);
    border: 1px solid var(--color-muted-bamboo);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: var(--transition-base);
}

.service-card:hover {
    border-color: var(--color-jade-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(79, 111, 100, 0.15);
}

.service-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background-color: rgba(79, 111, 100, 0.08);
    transition: var(--transition-base);
}

.service-card:hover .service-icon-wrapper {
    background-color: rgba(79, 111, 100, 0.15);
    transform: scale(1.05);
}

.service-icon {
    font-size: 1.75rem;
    color: var(--color-jade-green);
}

.service-title {
    font-family: var(--font-handwritten);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.service-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-ink-graphite);
    margin-bottom: 1rem;
    text-align: justify;
}

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

/* ========================================
   Philosophy Cards (O Medycynie section)
   ======================================== */

.philosophy-card {
    background: linear-gradient(135deg, #FAF7F2 0%, #F5EFE6 50%, #EDE7DC 100%);
    border: 1px solid var(--color-muted-bamboo);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: var(--transition-base);
}

.philosophy-card:hover {
    border-color: var(--color-jade-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(79, 111, 100, 0.15);
}

.philosophy-card:hover .service-icon-wrapper {
    background-color: rgba(79, 111, 100, 0.15);
    transform: scale(1.05);
}

.philosophy-title {
    font-family: var(--font-handwritten);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.philosophy-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-ink-graphite);
    margin-bottom: 1rem;
    text-align: justify;
}

.philosophy-text:last-child {
    margin-bottom: 0;
}

/* ========================================
   TCM Carousel Gallery (O Medycynie section)
   ======================================== */

#tcmCarousel {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 380px;
    margin: 0 auto;
}

.carousel-image {
    width: 100%;
    height: 580px;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition-base);
}

.carousel-image:hover {
    transform: scale(1.02);
}

/* Carousel indicators - subtelne kropki */
.carousel-indicators {
    margin-bottom: 15px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(79, 111, 100, 0.4);
    border: none;
}

.carousel-indicators button.active {
    background-color: var(--color-jade-green);
}

/* Carousel controls - subtelne strzałki */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(79, 111, 100, 0.7);
    border-radius: 50%;
    padding: 15px;
}

/* Lightbox - pełny ekran po kliknięciu */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #ffffff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--color-jade-green);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(79, 111, 100, 0.5);
}

.lightbox-prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 20px;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-jade-green);
}

/* Responsywność lightbox */
@media (max-width: 575.98px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 10px;
    }
}

/* ========================================
   About Me Section - Education & Biography
   ======================================== */

.about-subtitle {
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-jade-green);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.education-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

.education-list li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-ink-graphite);
    text-align: justify;
}

.education-list li::marker {
    color: var(--color-jade-green);
}

/* ========================================
   Portrait Image (O Mnie section)
   ======================================== */

.portrait-image {
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ========================================
   Location Section
   ======================================== */

.address-box {
    background: linear-gradient(135deg, #FAF7F2 0%, #F5EFE6 50%, #EDE7DC 100%);
    border: 1px solid var(--color-muted-bamboo);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    height: 400px;
    transition: var(--transition-base);
}

.address-box:hover {
    border-color: var(--color-jade-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(79, 111, 100, 0.15);
}

.address-title {
    font-family: var(--font-handwritten);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-jade-green);
    margin-bottom: 0.75rem;
}

.address-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-ink-graphite);
    margin-bottom: 0;
}

.address-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-ink-graphite);
    margin-bottom: 0;
}

.address-info {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-ink-graphite);
    padding: 1.25rem;
    background-color: var(--color-tea-beige);
    border-radius: 4px;
    border-left: 4px solid var(--color-jade-green);
}

.address-info i {
    color: var(--color-jade-green);
    margin-right: 0.5rem;
}

.map-container {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    display: block;
    width: 100%;
}

/* ========================================
   Contact Section
   ======================================== */

.contact-intro {
    font-size: 1.125rem;
    color: var(--color-ink-graphite);
    margin-bottom: 1.5rem;
}

.contact-info {
    margin: 2rem 0;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--color-jade-green);
    margin-bottom: 0.5rem;
}

.contact-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-jade-green);
    margin-bottom: 0.25rem;
}

.contact-link {
    font-size: 1.125rem;
    color: var(--color-ink-graphite);
    font-weight: 400;
    transition: var(--transition-base);
}

.contact-link:hover {
    color: var(--color-jade-green);
}

.contact-hours {
    font-size: 1.125rem;
    color: var(--color-ink-graphite);
    margin: 0;
}

/* ========================================
   Buttons
   ======================================== */

.btn-primary {
    background-color: var(--color-jade-green);
    border: 2px solid var(--color-jade-green);
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition-base);
}

.btn-primary:hover {
    background-color: var(--color-muted-ochre);
    border-color: var(--color-muted-ochre);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179, 106, 61, 0.3);
}

.btn-primary:focus {
    outline: 3px solid var(--color-jade-green);
    outline-offset: 2px;
    box-shadow: none;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--color-ink-graphite);
    color: var(--color-tea-beige);
    padding: 2rem 0;
}

.footer-text {
    font-size: 0.95rem;
    color: var(--color-tea-beige);
}

.footer-link {
    color: var(--color-muted-bamboo);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.footer-link:hover {
    color: var(--color-tea-beige);
    text-decoration: underline;
}

/* ========================================
   Fade-in Animation
   ======================================== */

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

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

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --spacing-section: 4rem;
    }

    .hero-logo {
        width: 300px;
    }

    #tcmCarousel {
        max-width: 320px;
    }

    .carousel-image {
        height: 480px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 2.25rem;
    }

    .section-heading {
        font-size: 3rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 3rem;
    }

    h3 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 2rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    :root {
        --spacing-section: 3rem;
    }

    body {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 90vh;
        padding: 5rem 1rem 3rem;
    }

    .hero-logo {
        width: 220px;
    }

    #tcmCarousel {
        max-width: 280px;
    }

    .carousel-image {
        height: 420px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .section-heading {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 2rem;
    }

    .section-text {
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .service-card {
        padding: 1.75rem 1.25rem;
    }

    .service-title,
    .philosophy-title {
        font-size: 2rem;
    }

    .service-text {
        font-size: 0.95rem;
    }

    .contact-icon {
        font-size: 2rem;
    }

    .contact-link {
        font-size: 1.25rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .portrait-image {
        height: auto;
        max-height: 400px;
    }

    .address-box {
        padding: 2rem 1.5rem;
    }

    .footer-text,
    .footer-link {
        font-size: 0.875rem;
    }
}

/* Very small mobile (below 576px) */
@media (max-width: 575px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .brand-text {
        font-size: 1.5rem;
    }

    .nav-logo {
        height: 40px;
    }

    .hero-logo {
        width: 180px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.75rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--color-jade-green);
    outline-offset: 2px;
}

/* Skip to main content link (for screen readers) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-jade-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Reduced Motion (Accessibility)
   ======================================== */

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

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .navbar,
    .scroll-indicator,
    .footer {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
