/* CSS Variables */
:root {
    --color-primary: #313832;
    --color-secondary: #f9ebcc;
    --color-accent: #fef9f0;
    --color-text: #313832;
    --color-text-light: #fef9f0;
    --color-background: #f9ebcc;
    --color-card: #fef9f0;
    --color-navbar: #313832;
    --color-navbar-text: #f9ebcc;
    --color-button: #313832;
    --color-button-text: #fef9f0;
    --color-footer: #333;
    --color-footer-text: #fef9f0;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-border: #e0d4b8;
}

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

html {
    scroll-behavior: smooth;
    /* Safari iOS fixes */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    /* Ensure proper viewport handling */
    height: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-background);
    font-weight: 400;
    /* Safari iOS fixes */
    height: 100%;
    /* Prevent Safari from zooming on input focus */
    -webkit-text-size-adjust: 100%;
    /* Ensure proper background handling */
    position: relative;
    overflow-x: hidden;
}

body, a {
    color: var(--color-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--color-navbar);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 64px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-container a,
.nav-menu a,
.nav-toggle {
    color: var(--color-secondary);
}

.nav-brand {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 1.15rem;
    max-width: min(100%, 560px);
    text-decoration: none;
    text-align: left;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 58px;
    width: auto;
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    line-height: 1.2;
}

.nav-title {
    font-size: 1.15rem;
    font-weight: 400;
}

.nav-tagline {
    font-size: 1rem;
    font-weight: 700;
}

.nav-toggle {
    grid-column: 3;
    justify-self: end;
    width: 52px;
    height: 52px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(249, 235, 204, 0.08);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.nav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 84vw);
    height: 100vh;
    padding: 6.5rem 2rem 2rem;
    background: var(--color-background);
    box-shadow: -16px 0 48px rgba(49, 56, 50, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1002;
}

.nav-menu.is-open {
    transform: translateX(0);
}

.nav-close {
    position: absolute;
    top: 1.35rem;
    right: 1.35rem;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
}

.nav-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.nav-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.nav-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.nav-menu a {
    display: block;
    padding: 0.3rem 0;
    border-radius: 14px;
    color: var(--color-primary);
    background: transparent;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-menu a:hover {
    background: transparent;
    transform: translateX(-4px);
}

body.menu-open {
    overflow: hidden;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 10vmin 20px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    overflow: hidden;
}

.hero-intro {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-main-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.2;
}

.hero-instruction {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0;
}

#home {
    transition: opacity .5s ease;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    max-height: 40vh;
    overflow: hidden;
    border-radius: 40px;
    margin: 0 auto;
    box-shadow: 0 20px 40px var(--color-shadow);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s ease-in-out;
    cursor: grab;
    user-select: none;
}

.carousel:active {
    cursor: grabbing;
}

.carousel-slide {
    position: relative;
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.carousel-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 40px;
}

.carousel-slide--left-top img {
    object-position: left top;
}

.carousel-slide--center-bottom img {
    object-position: center bottom;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    color: var(--color-primary);
    background: var(--color-secondary);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: absolute;
    left: 50%;
    top: 70%;
    transform: translate(-50%, -50%);
}

.cta-button:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    color: var(--color-primary);
    background: var(--color-secondary);
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-secondary);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-text-light);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.indicator:hover {
    background: var(--color-text-light);
    transform: scale(1.1);
}

.indicator.active {
    background: var(--color-text-light);
    transform: scale(1.2);
}

/* Decision Section */
.decision {
    padding: 30px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.decision-content {
    max-width: 900px;
    margin: 0 auto;
}

.decision-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.decision-text {
    font-size: 2rem;
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

/* About Section */
.about {
    padding: 40px 0 80px;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-text);
    font-weight: 700;
}

.about-layout {
    display: grid;
    grid-template-columns: 6fr 5fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-main {
    display: flex;
    flex-direction: column;
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-card {
    background: var(--color-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--color-shadow);
    transition: transform 0.3s ease;
}

.about-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-weight: 700;
}

.about-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-weight: 400;
    line-height: 1.6;
}

.about-card p:last-child {
    margin-bottom: 0;
}

/* Full-width card styles */
.about-card.full-width {
    margin-top: 2rem;
}

/* Two-column layout for Jak card */
.jak-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
}

.jak-image {
    flex: 0 0 60%;
    max-width: 600px;
}

.kytky-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jak-list {
    flex: 1;
}

.jak-list .approach-list {
    margin-top: 0;
}

.about-sidebar {
    height: 100%;
}

.about-me-card {
    background: var(--color-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--color-shadow);
    transition: transform 0.3s ease;
}

.about-me-image__wrapper {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px var(--color-shadow);
    overflow: hidden;
}

.about-me-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .3s;
    transform-origin: center 20%;
}

.about-me-image:hover {
    transform: scale(1.5);
}

.about-me-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-me-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

.approach-list {
    list-style: disc;
    margin: 0;
    padding-left: 1.5rem;
}

.approach-list li {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 400;
}

/* Services Section */
.services {
    padding: 30px 0;
}

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

.services-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 700;
}

.services-content > p {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 3rem;
    font-weight: 400;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.pricing-card {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--color-shadow);
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-10px) !important;
}

.pricing-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 700;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.pricing-card p {
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Testimonials Section */
.testimonials {
    padding: 60px 0;
    /*background: #313832;*/
    position: relative;
    z-index: 1;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-text);
    font-weight: 700;
}

.testimonials-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--color-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--color-shadow);
    transition: transform 0.3s ease;
}

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

.testimonial-card h4 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 700;
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--color-text);
    line-height: 1.8;
    position: relative;
    margin: 0;
    padding-left: 2rem;
}

.testimonial-card blockquote::before {
    content: '"';
    font-size: 3rem;
    color: var(--color-text);
    position: absolute;
    top: -0.5rem;
    left: 0;
    line-height: 1;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-text);
    font-weight: 700;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.contact-item i {
    font-size: 1.5rem;
    color: #007bff;
    width: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--color-card);
    color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(49, 56, 50, 0.1);
}

.submit-btn {
    background: var(--color-button);
    color: var(--color-button-text);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #4a4f4a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(49, 56, 50, 0.3);
}

.contact-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #313832;
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    font-weight: 700;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.footer-copyright {
    font-size: 0.9rem;
    font-weight: 400;
}

.footer-info a {
    color: var(--color-footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: #f9ebcc;
    text-decoration: underline;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .logo-image {
        height: 40px;
    }

    .nav-title {
        font-size: 0.95rem;
    }

    .nav-tagline {
        font-size: 0.82rem;
    }

    .hero {
        padding-top: 80px;
    }

    .hero-main-title {
        font-size: 1.5rem;
        margin-top: 1rem;
    }

    .hero-instruction {
        font-size: 1.1rem;
    }

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

    .decision-text {
        font-size: 1.3rem;
    }

    .carousel-container {
        height: 400px;
        border-radius: 30px;
        margin: 0 20px;
    }

    .carousel-slide img {
        border-radius: 30px;
    }

    .carousel-content {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .carousel-indicators {
        bottom: 20px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .about h2,
    .services-content h2,
    .testimonials h2,
    .contact h2 {
        font-size: 2rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-sidebar {
        position: static;
    }

    .about-me-card {
        margin-bottom: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .jak-content {
        align-items: flex-start;
    }

    .jak-image {
        flex: 0 0 40%;
        max-width: 100%;
    }

    .approach-list li {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        padding: 0 15px;
    }

    .nav-brand {
        grid-column: 1 / 3;
        justify-self: start;
        gap: 0.75rem;
    }

    .logo-image {
        height: 35px;
    }

    .nav-content {
        gap: 0.15rem;
    }

    .nav-title {
        font-size: 0.82rem;
    }

    .nav-tagline {
        font-size: 0.74rem;
    }

    .nav-toggle {
        width: 46px;
        height: 46px;
    }

    .nav-menu {
        width: min(320px, 88vw);
        padding: 6rem 1.25rem 1.5rem;
    }

    .nav-close {
        top: 1rem;
        right: 1rem;
    }

    .hero-main-title {
        font-size: 1.2rem;
    }

    .hero-instruction {
        font-size: 1rem;
    }

    .decision-title {
        font-size: 2rem;
    }

    .decision-text {
        font-size: 1.1rem;
    }

    .carousel-container {
        height: 300px;
        border-radius: 20px;
        margin: 0 15px;
    }

    .carousel-slide img {
        border-radius: 20px;
    }

    .carousel-content {
        padding: 1rem;
    }

    .cta-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

    .carousel-indicators {
        bottom: 15px;
        gap: 8px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .container {
        padding: 0 15px;
    }

    .pricing-card,
    .testimonial-card,
    .about-card {
        padding: 1.5rem;
    }

    /* Jak card responsive layout */
    .jak-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .jak-image {
        flex: none;
        max-width: 100%;
    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Page Background */
#page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: opacity;
}

/* Safari iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    #page-background {
        position: absolute;
        min-height: 100vh;
        height: 100vh;
        -webkit-background-size: cover;
        background-size: cover;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}
