/**
 * Gordon GWR - Additional Styles
 * Style dla dodatkowych komponentów
 */

/* =====================
   Form Validation Styles
   ===================== */
.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-input.success,
.form-textarea.success,
.form-select.success {
    border-color: #27ae60;
}

.form-error {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 4px;
    animation: fadeIn 0.2s ease;
}

/* =====================
   Loading Spinner
   ===================== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================
   Notifications
   ===================== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px 48px 16px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--primary);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #27ae60;
}

.notification-success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 14px;
}

.notification-error {
    border-left-color: #e74c3c;
}

.notification-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    margin-right: 12px;
    font-weight: bold;
}

.notification-message {
    vertical-align: middle;
}

.notification-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.notification-close:hover {
    color: #333;
}

/* =====================
   Cookie Banner
   ===================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.cookie-content p {
    flex: 1;
    min-width: 300px;
    margin: 0;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* =====================
   Animate on Scroll
   ===================== */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for cards */
.benefits-grid .animate-in:nth-child(1) { transition-delay: 0s; }
.benefits-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.benefits-grid .animate-in:nth-child(3) { transition-delay: 0.1s; }
.benefits-grid .animate-in:nth-child(4) { transition-delay: 0.2s; }
.benefits-grid .animate-in:nth-child(5) { transition-delay: 0.2s; }
.benefits-grid .animate-in:nth-child(6) { transition-delay: 0.3s; }
.benefits-grid .animate-in:nth-child(7) { transition-delay: 0.3s; }
.benefits-grid .animate-in:nth-child(8) { transition-delay: 0.4s; }
.benefits-grid .animate-in:nth-child(9) { transition-delay: 0.4s; }

.offer-grid .animate-in:nth-child(1) { transition-delay: 0s; }
.offer-grid .animate-in:nth-child(2) { transition-delay: 0.15s; }
.offer-grid .animate-in:nth-child(3) { transition-delay: 0.3s; }

/* =====================
   Header Scroll Effect
   ===================== */
.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* =====================
   Subpage Styles
   ===================== */
.page-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    padding: 140px 0 60px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 16px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.page-content {
    padding: 60px 0;
}

.page-content .container {
    max-width: 900px;
}

.page-content h2 {
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-light);
}

.page-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

.page-content p {
    margin-bottom: 16px;
    color: var(--text-gray);
}

.page-content ul,
.page-content ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-gray);
}

.page-content li {
    margin-bottom: 8px;
}

.page-content a {
    color: var(--primary);
    text-decoration: underline;
}

.page-content strong {
    color: var(--text-dark);
}

.page-content .last-updated {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-light);
    font-size: 0.9rem;
    color: #999;
}

/* =====================
   404 Page
   ===================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.error-content h1 {
    font-size: clamp(6rem, 20vw, 12rem);
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 16px;
}

.error-content p {
    color: var(--text-gray);
    margin-bottom: 32px;
    max-width: 500px;
}

.error-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================
   Back to Top Button
   ===================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 15px rgba(1, 112, 185, 0.4);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* =====================
   Responsive Adjustments
   ===================== */
@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }

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

    .cookie-content p {
        min-width: auto;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-buttons .btn {
        width: 100%;
    }
}

/* =====================
   Keyframes
   ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   Reduced Motion
   ===================== */
@media (prefers-reduced-motion: reduce) {
    .animate-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .notification,
    .cookie-banner {
        transition: none;
    }

    .spinner {
        animation: none;
    }
}

/* =====================
   Partners Logo Styles
   ===================== */
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 40px;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: grayscale(100%);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.partner-logo img {
    width: 100px;
    height: 40px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .partners-grid {
        gap: 20px 30px;
    }

    .partner-logo img {
        width: 80px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .partner-logo img {
        width: 70px;
        height: 28px;
    }
}

/* Serwis Section */
.serwis {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-price {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.serwis-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.serwis-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

/* =====================
   Serwis Section - Benefits Style
   ===================== */
.benefits.serwis {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
}

.benefits.serwis .benefit-card .service-price {
    display: block;
    margin-top: 1rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.benefits.serwis .benefit-card .service-price strong {
    background: linear-gradient(135deg, var(--primary), #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Serwis CTA - centered */
.benefits.serwis .serwis-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
}

.benefits.serwis .serwis-cta p {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.benefits.serwis .serwis-cta .btn {
    display: inline-block;
}

/* Force center serwis CTA */
.serwis-cta {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.serwis-cta p,
.serwis-cta .btn {
    text-align: center !important;
}

/* Fix service price visibility */
.benefits.serwis .benefit-card .service-price {
    display: block;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.benefits.serwis .benefit-card .service-price strong {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--primary);
    background-clip: unset;
    color: var(--primary);
    font-weight: 700;
}

/* Service price as button style */
.benefits.serwis .benefit-card .service-price {
    display: inline-block;
    margin-top: 1rem;
    padding: 12px 24px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
}

.benefits.serwis .benefit-card .service-price strong {
    background: none;
    -webkit-text-fill-color: var(--white);
    color: var(--white);
    font-weight: 600;
}
