/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fraunces:wght@700;800;900&display=swap');

/* Polish Flag Color Palette */
:root {
    --primary-dark: #b91c2a;
    --primary: #dc143c;
    --primary-light: #e63946;
    --accent: #ff4d5a;
    --accent-light: #ff6b77;
    --dark: #1a1a1a;
    --gray-dark: #2d2d2d;
    --gray: #666666;
    --gray-light: #e5e5e5;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #b91c2a 0%, #e63946 100%);
    --gradient-accent: linear-gradient(135deg, #dc143c 0%, #ff6b77 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Safe area for notched devices */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 6px;
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 4px;
    animation: slideDown 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.8);
    /* Touch-friendly spacing */
    min-height: 44px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.lang-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    color: var(--primary);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.4);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 650px;
    background: url('photos/485747506_671327808748792_3266934803704347562_n.jpg') center/cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(185, 28, 42, 0.92) 0%,
        rgba(220, 20, 60, 0.88) 50%,
        rgba(230, 57, 70, 0.85) 100%
    );
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 40px;
    max-width: 950px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(3rem, 7.5vw, 5.5rem);
    font-weight: 900;
    margin-bottom: 32px;
    letter-spacing: -0.04em;
    line-height: 1;
    position: relative;
    display: inline-block;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.92) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback for browsers that don't support background-clip */
    color: #ffffff;
    text-shadow: none;
    padding-bottom: 16px;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, transparent, white, transparent);
    border-radius: 3px;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.625rem);
    margin-bottom: 56px;
    font-weight: 400;
    line-height: 1.65;
    opacity: 0.95;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.01em;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 20px 56px;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 20, 60, 0.2), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.35);
}

.cta-button:active {
    transform: translateY(-2px) scale(1.01);
}

/* About Section */
.about {
    padding: 140px 0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    position: relative;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 100px;
}

.about-image {
    flex: 0 0 420px;
    position: relative;
    animation: fadeIn 1s ease-out;
}

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

.about-image img {
    width: 100%;
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image:hover img {
    transform: scale(1.03);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.75rem, 5.5vw, 4rem);
    color: var(--dark);
    margin-bottom: 36px;
    font-weight: 900;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 5px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.about-text p {
    font-size: 1.1875rem;
    margin-bottom: 28px;
    line-height: 1.85;
    color: var(--gray-dark);
    font-weight: 400;
}

/* Services Section */
.services {
    padding: 140px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-family: 'Fraunces', serif;
    font-size: clamp(2.75rem, 5.5vw, 4rem);
    color: var(--dark);
    margin-bottom: 96px;
    font-weight: 900;
    letter-spacing: -0.03em;
    position: relative;
    line-height: 1.1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 36px;
}

.service-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    padding: 56px 40px;
    border-radius: 28px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(220, 20, 60, 0.04) 0%,
        rgba(230, 57, 70, 0.06) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 28px;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.2);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(8deg);
    filter: grayscale(0);
}

.service-card h3 {
    font-size: 1.625rem;
    color: var(--dark);
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--gray);
    line-height: 1.75;
    font-size: 1.0625rem;
}

/* Why Me Section */
.why-me {
    padding: 140px 0;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.why-me::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-30px, 30px);
    }
}

.why-me .section-title {
    color: white;
    position: relative;
}

.why-me .section-title::after {
    background: var(--gradient-accent);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    position: relative;
}

.benefit {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: white;
    padding: 36px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
}

.benefit:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.benefit-icon {
    font-size: 1.875rem;
    font-weight: bold;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(230, 57, 70, 0.15) 100%);
    border-radius: 14px;
    color: var(--primary);
}

.benefit p {
    font-size: 1.0625rem;
    line-height: 1.75;
    font-weight: 400;
    color: var(--gray-dark);
}

/* Testimonials Section */
.testimonials {
    padding: 140px 0;
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.testimonial-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    padding: 48px 40px;
    border-radius: 28px;
    border: 2px solid var(--gray-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.quote-icon {
    font-family: 'Fraunces', serif;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: -20px;
    font-weight: 900;
}

.testimonial-text {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-dark);
    margin-bottom: 28px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author strong {
    font-size: 1.125rem;
    color: var(--dark);
    font-weight: 700;
}

.testimonial-author span {
    font-size: 0.9375rem;
    color: var(--gray);
}

/* Contact Section */
.contact {
    padding: 140px 0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.contact-content {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.3125rem;
    margin-bottom: 64px;
    color: var(--gray-dark);
    line-height: 1.8;
    font-weight: 400;
}

/* Contact Form */
.contact-form {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid var(--gray-light);
    border-radius: 20px;
    font-size: 1.0625rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: var(--dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 5px rgba(220, 20, 60, 0.12);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 160px;
    line-height: 1.7;
}

.submit-button {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 20px 56px;
    font-size: 1.1875rem;
    font-weight: 700;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 32px rgba(220, 20, 60, 0.35);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 48px rgba(220, 20, 60, 0.45);
}

.submit-button:active {
    transform: translateY(-2px) scale(1);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray);
    padding: 48px 0;
    text-align: center;
    font-size: 0.9375rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .about-content {
        flex-direction: column;
        gap: 56px;
    }

    .about-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 420px;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 80px;
    }

    .hero-content {
        padding: 28px;
    }

    .about,
    .services,
    .why-me,
    .contact {
        padding: 96px 0;
    }

    .section-title {
        margin-bottom: 72px;
    }

    .language-switcher {
        top: 20px;
        right: 20px;
        padding: 5px;
    }

    .lang-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .service-card {
        padding: 48px 32px;
    }

    .benefit {
        padding: 28px;
    }

    .benefits-grid {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        background-attachment: scroll;
        padding: 80px 0 60px;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-title::after {
        width: 80px;
        height: 4px;
    }

    .cta-button {
        padding: 18px 44px;
        font-size: 1.0625rem;
        width: 100%;
        max-width: 320px;
    }

    .submit-button {
        padding: 18px 44px;
        font-size: 1.0625rem;
    }

    .contact-intro {
        font-size: 1.125rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 16px 20px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .about-text h2::after,
    .section-title::after {
        width: 60px;
        height: 4px;
        bottom: -16px;
    }

    .about,
    .services,
    .why-me,
    .contact {
        padding: 80px 0;
    }
}

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

/* Selection styling */
::selection {
    background: var(--accent-light);
    color: white;
}

::-moz-selection {
    background: var(--accent-light);
    color: white;
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        /* Prevent iOS text size adjustment */
        -webkit-text-size-adjust: 100%;
    }
}

/* Ensure buttons and links are touch-friendly */
button,
a,
.lang-btn,
.cta-button,
.submit-button {
    -webkit-tap-highlight-color: rgba(220, 20, 60, 0.1);
    -webkit-touch-callout: none;
    min-height: 44px;
    min-width: 44px;
}

/* Improve performance on mobile */
@media (max-width: 768px) {
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .hero {
        /* Disable parallax on mobile for better performance */
        background-attachment: scroll !important;
    }
}

/* Very small devices (e.g., iPhone SE) */
@media (max-width: 375px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 3rem);
    }

    .language-switcher {
        top: 12px;
        right: 12px;
        padding: 4px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Large mobile devices / small tablets */
@media (min-width: 481px) and (max-width: 767px) {
    .about,
    .services,
    .why-me,
    .contact,
    .testimonials {
        padding: 90px 0;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: clamp(3.5rem, 6vw, 4.5rem);
    }

    .about-image {
        flex: 0 0 350px;
    }
}
