:root {
    --primary-color: #0d2818;
    --secondary-color: #d4af37;
    --accent-color: #1b4332;
    --text-dark: #2c2c2c;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #0d2818;
    --bg-cream: #f5f5f0;
    --gold: #d4af37;
    --gold-light: #e0c35a;
    --shadow: 0 10px 30px rgba(13, 40, 24, 0.1);
    --shadow-hover: 0 15px 40px rgba(13, 40, 24, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optymalizacja renderowania */
*,
*::before,
*::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    /* Poprawa płynności scrollowania */
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: #E3DFD3;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    will-change: transform;
    backface-visibility: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.nav-brand:hover .logo {
    opacity: 0.9;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    will-change: transform;
    backface-visibility: hidden;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.logo-name {
    font-family: 'Trajan Pro', 'Times New Roman', serif;
    font-size: 1.4rem;
    color: #4a4a4a;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-subtitle {
    font-family: 'Optima', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    color: #4a4a4a;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
    will-change: opacity;
    backface-visibility: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-dark);
    opacity: 0.7;
}

/* Przycisk Kontakt w menu */
.nav-link.nav-btn {
    background: #C4BFB3;
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.nav-link.nav-btn::after {
    display: none;
}

.nav-link.nav-btn:hover {
    background: #B8B3A7;
    color: #1a1a1a;
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #2d4a3e 0%, #3d5c4a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 50 Q 25 25, 50 50 T 100 50" stroke="rgba(201,162,39,0.1)" stroke-width="2" fill="none"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(45, 74, 62, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.hero-title {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.btn-primary {
    background: #C4BFB3;
    color: var(--text-dark);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: #B8B3A7;
}

.btn-secondary {
    background: #e8e6e0;
    color: var(--text-dark);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: #dcd9d0;
}

section {
    padding: 6rem 0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #5a6a7a;
    margin-bottom: 4rem;
    font-weight: 300;
}

.services {
    background: var(--bg-cream);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(13, 40, 24, 0.1);
    cursor: pointer;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.service-card:hover {
    transform: translate3d(0, -10px, 0);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    width: 80px;
    height: 80px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--secondary-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: #5a6a7a;
    line-height: 1.8;
}

.service-short {
    margin-bottom: 1rem;
}

.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-top: 1rem;
}

.service-details.active {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.service-details ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    text-align: left;
}

.service-details li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: #5a6a7a;
    position: relative;
    line-height: 1.6;
}

.service-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.service-toggle {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    will-change: background-color, color;
    backface-visibility: hidden;
}

.service-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.service-toggle.active {
    background: #3d5c4a;
    border-color: #3d5c4a;
    color: white;
}

/* Przycisk Szczegóły w rozwiniętych kafelkach */
.service-details .btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--gold-light));
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.3);
    border: none;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.service-details .btn-secondary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--secondary-color));
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 5px 16px rgba(212, 175, 55, 0.5);
    color: var(--primary-color);
}

.service-details .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.highlight-green {
    color: #2d4a3e;
}

.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #3d5c4a, #2d4a3e);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    box-shadow: var(--shadow);
    gap: 1rem;
}

.placeholder-text {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
    padding: 0 1rem;
}

.about-image img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

.about-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #5a6a7a;
    line-height: 1.8;
    text-align: justify;
}

.about-description a {
    color: var(--primary-color);
    text-decoration: none;
    font-style: italic;
    font-weight: 500;
    transition: var(--transition);
}

.about-description a:hover {
    color: var(--secondary-color);
}

.about-description strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.about-source {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(13, 40, 24, 0.2);
}

.about-source small {
    color: #7a8a9a;
}

.about-source a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.about-source a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.about-quote {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-cream);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-style: italic;
}

.about-quote p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.about-quote cite {
    font-size: 1rem;
    color: var(--text-dark);
    font-style: normal;
    font-weight: 600;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #5a6a7a;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact {
    background: var(--bg-cream);
    padding-top: 1rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: stretch;
}

.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-column {
    display: flex;
    justify-content: center;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    padding: 1.25rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex: 1;
    border: 1px solid rgba(13, 40, 24, 0.1);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.contact-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3d5c4a, #2d4a3e);
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.contact-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--text-light);
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.contact-item p {
    color: #5a6a7a;
    line-height: 1.4;
    font-size: 0.9rem;
}

.contact-item p a,
.contact-item a {
    color: inherit;
    text-decoration: none;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    width: 100%;
    border: 1px solid rgba(13, 40, 24, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid rgba(13, 40, 24, 0.2);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-light);
    will-change: border-color, background-color;
    backface-visibility: hidden;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group span {
    font-size: 0.9rem;
    color: #5a6a7a;
    line-height: 1.5;
}

.contact-form .btn {
    display: block;
    margin: 0 auto;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-message.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.footer {
    background: #E3DFD3;
    color: var(--text-dark);
    text-align: center;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 1rem;
}

.footer-contact span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact a {
    color: var(--text-dark);
    text-decoration: none;
}

.footer-contact a:hover {
    opacity: 0.7;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-link:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-separator {
    opacity: 0.5;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 640px) {
    .footer-contact {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-separator {
        display: none;
    }
}

.cookies-policy {
    background: white;
    padding: 6rem 0;
}

.policy-content {
    max-width: 900px;
    margin: 0 auto;
}

.policy-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content p {
    color: #5a6a7a;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.policy-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.policy-content a:hover {
    color: var(--secondary-color);
}

.cookie-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.cookie-type-card {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.cookie-type-card h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.cookie-type-card p {
    color: #5a6a7a;
    margin: 0;
    line-height: 1.7;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #C4BFB3;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    will-change: transform, opacity;
    backface-visibility: hidden;
    z-index: 1001;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: #B8B3A7;
}

/* CTA Pop-up */
.cta-popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(13, 40, 24, 0.25);
    padding: 1.75rem;
    max-width: 320px;
    z-index: 1000;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    visibility: hidden;
    transition: all 0.4s ease-out;
    border: 1px solid rgba(13, 40, 24, 0.1);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.cta-popup.show {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.cta-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7a8a9a;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.cta-popup-close:hover {
    color: var(--primary-color);
}

.cta-popup-content {
    text-align: center;
}

.cta-popup-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.cta-popup h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.cta-popup p {
    color: #5a6a7a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.cta-popup-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .cta-popup {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ===== Page Transition Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale3d(0.95, 0.95, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Page load animation */
body {
    animation: fadeIn 0.4s ease-out;
    will-change: opacity;
    backface-visibility: hidden;
}

/* Page transition - fade out before navigation */
body.page-transition {
    animation: fadeOut 0.3s ease-in forwards;
}

/* Main content animation */
main {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Staggered animations for sections */
main > section:nth-child(1) {
    animation: fadeIn 0.5s ease-out 0.1s both;
}

main > section:nth-child(2) {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

main > section:nth-child(3) {
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

main > section:nth-child(4) {
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

/* Subpage hero animation */
.subpage-hero {
    animation: fadeIn 0.5s ease-out both;
}

.subpage-hero h1 {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.subpage-hero p {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Breadcrumb animation */
.breadcrumb {
    animation: slideInFromLeft 0.4s ease-out 0.3s both;
}

/* Navigation link hover effect enhancement */
.nav-link {
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Service cards animation on page load */
.service-card {
    animation: scaleIn 0.5s ease-out both;
}

.services-grid .service-card:nth-child(1) {
    animation-delay: 0.2s;
}

.services-grid .service-card:nth-child(2) {
    animation-delay: 0.35s;
}

.services-grid .service-card:nth-child(3) {
    animation-delay: 0.5s;
}

/* Contact items animation */
.contact-item {
    animation: slideInFromLeft 0.5s ease-out both;
}

.contact-info-column .contact-item:nth-child(1) {
    animation-delay: 0.2s;
}

.contact-info-column .contact-item:nth-child(2) {
    animation-delay: 0.3s;
}

.contact-info-column .contact-item:nth-child(3) {
    animation-delay: 0.4s;
}

.contact-info-column .contact-item:nth-child(4) {
    animation-delay: 0.5s;
}

/* Contact form animation */
.contact-form-column {
    animation: slideInFromRight 0.6s ease-out 0.3s both;
}

/* About section animation */
.about-image {
    animation: slideInFromLeft 0.6s ease-out 0.2s both;
}

.about-text {
    animation: slideInFromRight 0.6s ease-out 0.3s both;
}

/* Footer animation */
footer {
    animation: fadeIn 0.5s ease-out 0.5s both;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* View Transitions API support */
@supports (view-transition-name: main) {
    ::view-transition-old(root) {
        animation: fadeOut 0.25s ease-in;
    }
    
    ::view-transition-new(root) {
        animation: fadeIn 0.25s ease-out;
    }
    
    main {
        view-transition-name: main-content;
    }
    
    ::view-transition-old(main-content) {
        animation: slideInFromLeft 0.3s ease-in reverse;
    }
    
    ::view-transition-new(main-content) {
        animation: slideInFromRight 0.3s ease-out;
    }
}

@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #E3DFD3;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .contact-item {
        flex: unset;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .contact-info-column {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* ===== Scroll Animation Classes ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Copyable Contact Items ===== */
.contact-item.copyable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 1rem;
    margin: -1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
}

.contact-item.copyable:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(5px);
}

.contact-item.copyable::after {
    content: 'Kliknij, aby skopiować';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.contact-item.copyable:hover::after {
    opacity: 1;
}

.contact-item.copied {
    background: rgba(40, 167, 69, 0.15) !important;
}

.contact-item.copied::after {
    content: '✓ Skopiowano!' !important;
    color: #28a745 !important;
    opacity: 1 !important;
    font-weight: 600;
}

@media (max-width: 768px) {
    .contact-item.copyable::after {
        display: none;
    }
    
    .contact-item.copyable {
        padding: 0.75rem;
        margin: -0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .contact-item.copied::after {
        display: block;
        position: fixed;
        top: auto;
        bottom: 100px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        background: #28a745;
        color: white !important;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        z-index: 1000;
        font-size: 0.9rem;
    }
}

/* Button hover animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Card hover animations */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* Image placeholder animation */
.image-placeholder {
    transition: transform 0.3s ease;
}

.about-image:hover .image-placeholder {
    transform: scale(1.02);
}

/* Link underline animation */
.about-description a,
.footer a {
    position: relative;
    text-decoration: none;
}

.about-description a::after,
.footer-contact a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.about-description a:hover::after,
.footer-contact a:hover::after {
    width: 100%;
}

/* FAQ Section Styles */
.faq-section {
    background: var(--bg-cream);
    padding: 6rem 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.faq-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .faq-item {
        padding: 1.5rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
}

/* CTA Section */
.cta-section {
    background: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cta-section p {
    margin-bottom: 2rem;
    color: var(--text-color);
}
