/* ===================================================================== */
/* ========================= FORM STYLES CSS =========================== */
/* ===================================================================== */

/* ================= KONTAKT SEKCE ================= */
.contact {
    padding: 100px 0;
    background: var(--secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.contact-phone {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition);
}

.contact-phone:hover {
    color: var(--accent);
}

.contact-card p {
    color: var(--gray-dark);
    margin-bottom: 10px;
    line-height: 1.6;
}

.contact-card em {
    font-size: 14px;
    color: var(--gray-dark);
    font-style: italic;
}

/* ================= FORMULÁŘE ================= */
.contact-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.contact-form-wrapper h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 30px;
}

.enhanced-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.enhanced-form .form-group {
    position: relative;
}

.enhanced-form label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
}

.enhanced-form input,
.enhanced-form select,
.enhanced-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background: #fff;
    font-family: inherit;
}

.enhanced-form input:focus,
.enhanced-form select:focus,
.enhanced-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 131, 143, 0.1);
}

.enhanced-form input:valid,
.enhanced-form select:valid,
.enhanced-form textarea:valid {
    border-color: #10b981;
}

.enhanced-form input.error,
.enhanced-form select.error,
.enhanced-form textarea.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.enhanced-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 5px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
    background: #fff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* Error messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    min-height: 16px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Form messages */
.form-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.success::before {
    content: '✓';
    font-weight: 700;
    font-size: 16px;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-message.error::before {
    content: '⚠';
    font-weight: 700;
    font-size: 16px;
}

.form-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.form-message.warning::before {
    content: '⚠';
    font-weight: 700;
    font-size: 16px;
}

/* Button states */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 131, 143, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Form animations */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 131, 143, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.form-group.success::before {
    left: 100%;
}

/* Phone input formatting */
.phone-input-wrapper {
    position: relative;
}

.phone-input-wrapper::before {
    content: '🇨🇿 +420';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.phone-input-wrapper input {
    padding-left: 80px;
}

/* Notifikace styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease;
}

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

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left: 4px solid #065f46;
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left: 4px solid #991b1b;
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-left: 4px solid #92400e;
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-left: 4px solid #1d4ed8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Formulář reset styling */
.form-reset-animation {
    animation: formResetFlash 0.5s ease;
}

@keyframes formResetFlash {
    0% { background-color: transparent; }
    50% { background-color: rgba(16, 185, 129, 0.1); }
    100% { background-color: transparent; }
}

/* ================= RESPONSIVE DESIGN ================= */

/* Tablet */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form-wrapper {
        order: 1;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .contact {
        padding: 60px 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 30px 25px;
    }
    
    .contact-card {
        padding: 25px;
    }
    
    .enhanced-form {
        gap: 20px;
    }
    
    .enhanced-form input,
    .enhanced-form select,
    .enhanced-form textarea {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .contact-form-wrapper {
        padding: 20px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    .contact-phone {
        font-size: 20px;
    }
    
    .notification {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .notification-content {
        gap: 8px;
    }
}