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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

main {
    margin-top: 80px;
}

section {
    padding: 60px 0;
}

.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Okładka książki.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.2;
    z-index: 0;
}

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

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

.book-cover {
    max-width: 300px;
    height: auto;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0.3);
    margin-bottom: 30px;
}

.book-info h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.book-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #c0392b;
}

.about, .author, .reviews {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin: 20px auto;
    padding: 30px;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about h2, .author h2, .reviews h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #2c3e50;
}

.book-details {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.book-details p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.author p, .reviews p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.author ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.author li {
    margin-bottom: 10px;
}

.review {
    max-width: 800px;
    margin: 0 auto;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reviewer {
    font-style: italic;
    text-align: right;
    margin-top: 15px;
}

.order {
    background: linear-gradient(135deg, #76b852 0%, #8DC26F 100%);
    text-align: center;
    padding: 60px 0;
}

/* Kalkulator cen */
.price-calculator {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.price-calculator h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.price-details {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.price-details p {
    margin: 5px 0;
    font-size: 16px;
}

.quantity-selector {
    margin-bottom: 25px;
}

.quantity-selector label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

#quantity {
    width: 120px;
    height: 40px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    background: white;
    cursor: pointer;
    padding: 0 10px;
}

.total-calculation {
    background: #fff3e0;
    border: 2px solid #f39c12;
    border-radius: 12px;
    padding: 20px;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.calculation-row:last-child {
    margin-bottom: 0;
}

.total-row {
    border-top: 2px solid #f39c12;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 20px;
    color: #d35400;
}

.order h2 {
    margin-bottom: 30px;
    font-size: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
}

.payment-options {
    margin-top: 30px;
}

.payment-options h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.submit-button {
    background-color: #27ae60;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-button:hover {
    background-color: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.payu-button {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    font-weight: bold;
    font-size: 1.3rem;
}

.payu-button:hover {
    background: linear-gradient(135deg, #219a52 0%, #1e8449 100%);
}

.traditional-button {
    background-color: #3498db;
    font-size: 1.1rem;
}

.traditional-button:hover {
    background-color: #2980b9;
}

.payment-icon {
    font-size: 1.5rem;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    .hero .container {
        padding: 0 20px;
    }

    .book-info h1 {
        font-size: 2rem;
    }

    .book-description {
        font-size: 1rem;
    }

    .book-details p {
        font-size: 1rem;
    }

    .author p, .reviews p {
        font-size: 1rem;
    }
}

/* Payment Methods Preview */
.payment-methods-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
}

.payment-methods-preview h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.payment-method-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.payment-method-item:hover:not(.disabled):not(#showMoreMethods) {
    border-color: #27ae60;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
    transform: translateY(-2px);
}

.payment-method-item:active:not(.disabled):not(#showMoreMethods) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(39, 174, 96, 0.3);
}

#showMoreMethods {
    cursor: pointer;
}

#showMoreMethods:hover {
    background: #e8e8e8 !important;
    border-color: #27ae60;
}

.payment-method-item.disabled {
    opacity: 0.5;
    filter: grayscale(100%);
}

.payment-method-item img {
    width: 100%;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
}

.payment-method-item .method-name {
    font-size: 11px;
    color: #555;
    font-weight: 500;
    line-height: 1.2;
    display: block;
    margin-top: 5px;
}

/* Przycisk "więcej" metod płatności */
.show-more-methods {
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-methods:hover {
    background: #e0e0e0 !important;
    transform: scale(1.05);
}

.show-more-methods:active {
    transform: scale(0.98);
}

.loading-payment-methods {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.payment-methods-error {
    text-align: center;
    padding: 15px;
    color: #e74c3c;
    background: #fadbd8;
    border-radius: 5px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .payment-methods-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
    
    .payment-method-item {
        padding: 8px;
    }
    
    .payment-method-item img {
        height: 30px;
    }
    
    .payment-method-item .method-name {
        font-size: 10px;
    }
}

/* Modal styles */
.modal {
    display: none !important;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.modal[style*="display: block"] {
    display: block !important;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    position: relative;
}

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

.modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

.modal-content h2 {
    color: #27ae60;
    margin-top: 0;
}

.transfer-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.transfer-details h3 {
    margin-top: 0;
    color: #2c3e50;
}

.transfer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
    gap: 10px;
}

.transfer-row:last-child {
    border-bottom: none;
}

.transfer-row.highlight {
    background: #fff3cd;
    padding: 15px;
    margin: 10px -10px;
    border-radius: 8px;
    border: 2px solid #ffc107;
}

.transfer-label {
    font-weight: 600;
    color: #555;
    flex: 0 0 140px;
}

.transfer-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: white;
    padding: 8px 12px;
    border-radius: 5px;
    word-break: break-all;
}

.copy-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #229954;
}

.copy-btn:active {
    background: #1e8449;
}

.modal-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.modal-warning p {
    margin: 8px 0;
    color: #856404;
}

.modal-warning strong {
    color: #d63031;
}

.modal-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: #229954;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .transfer-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .transfer-label {
        flex: none;
    }
    
    .transfer-value {
        width: 100%;
    }
    
    .copy-btn {
        width: 100%;
    }
}

/* ===== Sekcja prawna (Legal Section) ===== */
.legal-section {
    background: white;
    padding: 80px 20px;
    margin-top: 40px;
}

.legal-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

.legal-section h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.legal-section h4 {
    font-size: 1.3rem;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.company-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.company-info p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.terms-content, .privacy-content {
    margin: 20px 0;
}

.terms-content p, .privacy-content p {
    margin: 12px 0;
}

.terms-content ul, .privacy-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.terms-content li, .privacy-content li {
    margin: 8px 0;
}

/* Footer enhancement */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

footer p {
    margin: 8px 0;
    font-size: 0.95rem;
}

footer a {
    color: white;
    text-decoration: underline;
    transition: color 0.3s;
}

footer a:hover {
    color: #3498db;
}

/* Responsive dla sekcji prawnej */
@media (max-width: 768px) {
    .legal-section h2 {
        font-size: 2rem;
    }
    
    .legal-section h3 {
        font-size: 1.5rem;
    }
    
    .legal-section h4 {
        font-size: 1.2rem;
    }
    
    .legal-content {
        font-size: 0.95rem;
    }
}
