/* ==========================================
   CONTACT PAGE STYLES - ФИНАЛНА ОПТИМИЗИРАНА ВЕРСИЯ
   ========================================== */

/* Основен контейнер */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Заглавна част */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2rem;
    color: #1d3557;
    margin-bottom: 10px;
    line-height: 1.2;
}

.page-header p {
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Основна структура */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* Карти с информация и форма */
.contact-info-card,
.contact-form-card {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    min-height: 400px; /* За предотвратяване на CLS */
}

/* Заглавия в картите */
.contact-info-card h2,
.contact-form-card h2 {
    font-size: 1.4rem;
    color: #111827;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    line-height: 1.3;
}

.contact-info-card h2::after,
.contact-form-card h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: #dc2626;
    border-radius: 2px;
}

/* Контактна информация */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    font-size: 1.4rem;
    background: #f3f4f6;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    user-select: none;
}

.contact-info-details h3 {
    font-size: 1rem;
    color: #111827;
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-info-details p,
.contact-info-details a {
    font-size: 0.95rem;
    color: #374151;
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1.5;
}

.contact-info-details a {
    color: #1e40af;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.contact-info-details a:hover,
.contact-info-details a:focus {
    color: #1e3a8a;
    text-decoration: none;
}

.contact-info-details a:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

/* Форма */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.form-input,
.form-textarea {
    padding: 12px 15px;
    border: 2px solid #9ca3af;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: #111827;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* Бутон за изпращане - максимален контраст */
/* Заменете текущия .submit-btn с този */
.submit-btn {
    background: #000000 !important; /* Чисто черно - максимален контраст */
    color: #ffffff !important;
    border: 3px solid #ffd700 !important; /* Златиста рамка */
    padding: 14px 25px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    width: 100% !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.submit-btn:hover,
.submit-btn:focus {
    background: #1a1a1a !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

.submit-btn:focus-visible {
    outline: 3px solid #1d3557;
    outline-offset: 2px;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Съобщения за успех/грешка */
.alert-success {
    background: #d1fae5;
    color: #064e3b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    border-left: 4px solid #059669;
    line-height: 1.5;
}

.alert-error {
    background: #fee2e2;
    color: #7f1d1d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    border-left: 4px solid #dc2626;
    line-height: 1.5;
}

/* Карта - без Google Maps, само CSS */
.map-container {
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: #f3f4f6;
    box-sizing: border-box;
    min-height: 350px; /* Фиксирана височина за CLS */
}

.map-placeholder {
    width: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 12px;
}

.map-content {
    text-align: center;
    color: #ffffff;
    padding: 20px;
}

.map-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.map-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.map-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #f3f4f6;
}

.map-link {
    display: inline-block;
    background: #ffffff;
    color: #1e40af;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s, transform 0.2s;
    min-height: 48px;
    box-sizing: border-box;
}

.map-link:hover,
.map-link:focus {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.map-link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success,
.alert-error {
    animation: fadeIn 0.3s ease-in-out;
}

/* Достъпност */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Намаляване на анимации */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* FOOTER СТИЛОВЕ - МАКСИМАЛЕН КОНТРАСТ */
html body .site-footer {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 20px !important;
}

html body .site-footer a,
html body .site-footer .social-link,
html body .site-footer a:visited {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;
}

html body .site-footer a:hover,
html body .site-footer .social-link:hover,
html body .site-footer a:focus {
    color: #ffd700 !important;
    text-decoration: none !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
}

html body .site-footer .social-link {
    display: inline-block !important;
    padding: 8px 12px !important;
    margin: 2px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
}

/* Cookie банер - висок контраст */
.cookie-btn-primary {
    background: #1e40af !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 2px solid #ffffff !important;
}

/* Фокус стилове за всички интерактивни елементи */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

/* Подобрена четимост */
p, a, label, input, textarea, button {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Медиа заявки за мобилни устройства */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-info-card,
    .contact-form-card {
        min-height: auto; /* Премахване на min-height на мобилни */
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .contact-info-card,
    .contact-form-card {
        padding: 20px;
    }
    
    .contact-info-card h2,
    .contact-form-card h2 {
        font-size: 1.2rem;
    }
    
    .map-container,
    .map-placeholder {
        min-height: 250px;
    }
    
    .map-icon {
        font-size: 2.5rem;
    }
    
    .map-content h3 {
        font-size: 1.3rem;
    }
    
    .submit-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    .contact-info-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .map-link {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* Допълнителни стилове за стабилност на layout */
img {
    max-width: 100%;
    height: auto;
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}