/*
Theme Name: RZ Rehabilitation Center
Author: Antigravity
Description: A premium, modern theme for a rehabilitation center based on the "Razom Zrostajemo" brand.
Version: 1.1
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Mint / Teal Base */
    --primary-color: #26A69A;
    /* Mint/Teal */
    --primary-light: #80CBC4;
    --primary-dark: #00796B;

    --secondary-color: #98C21E;
    /* Green from Logo */
    --accent-orange: #F7931E;
    --accent-pink: #E41A5D;
    --accent-blue: #00ADEF;

    /* UI Colors - Light Base */
    --bg-light: #F9FAFB;
    /* Off-white background */
    --bg-accent: #E0F2F1;
    /* Very light mint tint */
    --bg-card: #FFFFFF;
    --text-dark: #111827;
    /* Near black for high readability */
    --text-main: #374151;
    /* Dark grey for body text */
    --text-muted: #6B7280;
    --white: #ffffff;

    /* Design Tokens */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(38, 166, 154, 0.05);
    --shadow-md: 0 10px 30px rgba(38, 166, 154, 0.08);
    --shadow-lg: 0 20px 40px rgba(38, 166, 154, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-width: 1240px;

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(38, 166, 154, 0.1);
}

[data-theme="dark"] {
    --bg-light: #0B1419;
    --bg-accent: #111D24;
    --bg-card: #15242D;
    --text-dark: #F0F4F7;
    --text-main: #CBD5E0;
    --text-muted: #8A9BA8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(15, 25, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Layout */
section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.2);
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(152, 194, 30, 0.2);
}

.btn-secondary:hover {
    background: #A9D622;
    box-shadow: 0 8px 25px rgba(152, 194, 30, 0.3);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* Site Logo */
.site-logo {
    height: 70px;
    width: auto;
    display: block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(-20px) scale(0.8);
    pointer-events: none;
}

.main-header.scrolled .site-logo {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

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

/* Footer */
.main-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 100px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
    padding-bottom: 80px;
}

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-family: var(--font-heading);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-item svg {
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 40px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .site-logo {
        height: 50px;
    }

    .footer-grid {
        gap: 40px;
    }
}

/* Section Decor */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent-line {
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 20px auto;
    border-radius: 10px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Header */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    /* Increased to be above everything */
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled {
    background: var(--bg-card);
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-list li a {
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-size: 0.95rem;
    position: relative;
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-list li a:hover {
    color: var(--primary-color);
}

.nav-list li a:hover::after {
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-link {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-accent);
}

.lang-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--bg-accent);
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    /* Use primary color for visibility */
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span {
    background-color: var(--white);
    /* White X on dark background */
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-only-controls {
    display: none;
    width: 100%;
}

.mobile-only-controls .btn {
    width: 100%;
    padding: 16px;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    .desktop-only {
        display: none;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        /* Wider on mobile */
        max-width: 350px;
        height: 100vh;
        background: var(--bg-card);
        padding: 120px 40px;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3);
        transition: var(--transition);
        z-index: 1050;
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 25px;
    }

    .nav-list li a {
        font-size: 1.2rem;
    }

    .mobile-only-controls {
        display: block;
        margin-top: 20px;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px);
        z-index: 1040;
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(38, 166, 154, 0.08), transparent),
        radial-gradient(circle at bottom left, rgba(152, 194, 30, 0.08), transparent);
    padding-top: 140px;
    padding-bottom: 80px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-logo-large {
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-logo-large img {
    height: 180px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
    margin: 0 auto;
}

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

@media (max-width: 992px) {
    .hero-logo-large img {
        height: 120px;
    }
}

.hero h1 {
    font-size: 4.8rem;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 540px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 8px solid var(--white);
    transform: rotate(2deg);
    transition: var(--transition);
}

.hero-img:hover {
    transform: rotate(0) scale(1.02);
}

.hero-visual::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--bg-accent);
    border-radius: var(--radius-lg);
    z-index: -1;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        margin-inline: auto;
    }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more span {
    transition: var(--transition);
}

.read-more:hover span {
    transform: translateX(5px);
}

/* About Section */
.bg-accent {
    background-color: var(--bg-accent);
}

.about-flex {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 100px;
    align-items: center;
}

.about-text .section-header {
    text-align: left;
    margin-bottom: 40px;
}

.about h2 {
    font-size: 3.5rem;
}

.about .lead {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-family: var(--font-heading);
}

.strengths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 50px;
}

.strength-item h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-item h4::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--secondary-color);
    border-radius: 4px;
}

.strength-item ul li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    color: var(--text-muted);
}

.strength-item ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 800;
}

.about-reviews {
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.review-card {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--bg-accent);
    margin-bottom: 32px;
}

.review-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 16px;
    color: var(--text-main);
}

.review-card cite {
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Prices Section */
.price-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
}

.price-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 24px 40px;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.price-table td {
    padding: 24px 40px;
    border-bottom: 1px solid var(--bg-accent);
    color: var(--text-main);
    transition: var(--transition);
}

.price-table tr:hover td {
    background: var(--bg-accent);
    color: var(--primary-color);
}

.price-table-wrapper h3 {
    padding: 30px 40px 10px;
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.sub-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.sub-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.sub-header h4 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.sub-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.sub-duration {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 30px;
}

.sub-features {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    text-align: left;
    flex-grow: 1;
}

.sub-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-accent);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-features li:last-child {
    border-bottom: none;
}

.sub-features .check {
    color: var(--primary-color);
    font-weight: bold;
}

.sub-card .btn {
    width: 100%;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

@media (max-width: 1024px) {
    .about-flex {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .strengths {
        grid-template-columns: 1fr;
    }

    .price-table th,
    .price-table td {
        padding: 15px 20px;
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(38, 166, 154, 0.3);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Mobile Pricing Fixes */
@media (max-width: 768px) {

    .price-table th,
    .price-table td {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }

    .price-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .price-table {
        min-width: 400px !important;
    }

    .subscriptions-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .sub-card {
        padding: 30px 20px !important;
    }

    .sub-price {
        font-size: 2.2rem !important;
    }
}

/* Mini-cards for mobile pricing */
@media (max-width: 768px) {

    .price-table,
    .price-table thead,
    .price-table tbody,
    .price-table th,
    .price-table td,
    .price-table tr {
        display: block;
        width: 100% !important;
    }

    .price-table thead {
        display: none !important;
    }

    .price-table tbody {
        display: grid !important;
        grid-template-columns: 1fr !important;
        /* Stacked cards */
        gap: 20px !important;
        padding: 15px !important;
        background: transparent !important;
    }

    .price-table tr {
        background: var(--bg-card) !important;
        padding: 20px !important;
        border-radius: var(--radius-lg) !important;
        box-shadow: var(--shadow-md) !important;
        border: 1px solid var(--glass-border) !important;
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important;
    }

    .price-table td {
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid var(--bg-accent) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .price-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.8rem;
        margin-right: 15px;
    }

    .price-table td:first-child {
        font-weight: 800 !important;
        color: var(--primary-color) !important;
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
        border-bottom: 2px solid var(--secondary-color) !important;
        display: block !important;
        padding-bottom: 15px !important;
    }

    .price-table td:first-child::before {
        display: none !important;
    }

    .price-table td:last-child {
        border-bottom: none !important;
    }
}

/* Fix horizontal scroll on mobile pricing */
@media (max-width: 768px) {
    * {
        box-sizing: border-box !important;
    }

    .price-table-wrapper {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .price-table {
        min-width: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .price-table td {
        word-break: break-word !important;
    }
}

@media (max-width: 380px) {
    .price-table tbody {
        grid-template-columns: 1fr !important;
    }
}