/* ==========================================
   CONTACTS.CSS — Move IT Education v4.0
   
   Об'єднано з: contacts.css, сontact-modal.css
   ВИПРАВЛЕНО: видалено дублікати floatBubble1/2/3
   (вони є в theme.css → animations)
   ========================================== */


/* ==========================================
   CONTACTS SECTION
   ========================================== */

.contacts-section { position: relative; margin-top: 60px; }

.contacts-main-card { padding: 50px 40px; }

/* Base bubble — position:absolute ОБОВ'ЯЗКОВО, інакше вони стають блочними елементами
   і займають місце всередині картки, створюючи пустий простір */
.contacts-bubble {
    position: absolute;
    background: rgba(255, 165, 112, 0.2);
    border-radius: 50%;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        inset 0 0 40px rgba(255, 229, 153, 0.1);
    backdrop-filter: blur(20px);
    z-index: 1;
    pointer-events: none;
}

.contacts-bubble-1 { width: 180px; height: 180px; left: -70px; top: 100px; animation: floatBubble1 10s ease-in-out infinite; }
.contacts-bubble-2 { width: 140px; height: 140px; right: -60px; top: 300px; animation: floatBubble2 12s ease-in-out infinite; }
.contacts-bubble-3 { width: 100px; height: 100px; left: -40px; bottom: 150px; animation: floatBubble3 9s ease-in-out infinite; }

.contacts-subtitle { font-size: 1.8rem; color: var(--color-beige-dark); margin-bottom: 30px; font-weight: 700; text-shadow: 0 0 20px var(--color-glow-text); text-align: center; }

/* Social Media */
.social-media-block { position: relative; z-index: 5; margin-bottom: 50px; }

.social-links-grid { display: flex; justify-content: center; align-items: center; gap: 20px; max-width: 900px; margin: 0 auto; flex-wrap: wrap; }

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 165, 112, 0.25);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 2px 10px rgba(255,229,153,0.1);
    border: 3px solid rgba(255, 165, 112, 0.3);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(15px);
    animation: floatSocial 6s ease-in-out infinite;
}

.social-link:nth-child(1) { animation-delay: 0s; }
.social-link:nth-child(2) { animation-delay: 0.5s; }
.social-link:nth-child(3) { animation-delay: 1s; }
.social-link:nth-child(4) { animation-delay: 1.5s; }
.social-link:nth-child(5) { animation-delay: 2s; }
.social-link:nth-child(6) { animation-delay: 2.5s; }

.social-link::before { content: ''; position: absolute; top: 10%; left: 10%; width: 35%; height: 35%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, transparent 100%); border-radius: 50%; transition: opacity 0.3s ease; }

.social-link::after { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; background: radial-gradient(circle, rgba(255,229,153,0.3) 0%, transparent 70%); transform: translate(-50%,-50%) scale(0); border-radius: 50%; opacity: 0; transition: all 0.5s ease; pointer-events: none; }
.social-link:hover::after { transform: translate(-50%,-50%) scale(1.5); opacity: 1; }

.social-link:hover { transform: translateY(-10px) scale(1.15); box-shadow: 0 15px 40px rgba(0,0,0,0.5), inset 0 2px 15px rgba(255,229,153,0.2); animation-play-state: paused; }

.social-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.social-icon svg { width: 35px; height: 35px; transition: all 0.4s cubic-bezier(0.68,-0.55,0.265,1.55); filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)); }
.social-link:hover .social-icon svg { transform: scale(1.2) rotate(10deg); }

.social-name { position: absolute; bottom: -35px; left: 50%; transform: translateX(-50%) scale(0.8); font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.9); background: rgba(45,70,40,0.95); padding: 6px 12px; border-radius: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55); box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,165,112,0.3); }
.social-name::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid rgba(45,70,40,0.95); }
.social-link:hover .social-name { opacity: 1; transform: translateX(-50%) scale(1); bottom: -40px; }

/* Social brand colors */
.social-facebook:hover  { background: rgba(24,119,242,0.2); border-color: #1877F2; }
.social-facebook .social-icon { color: #1877F2; }
.social-instagram:hover { background: rgba(228,64,95,0.2); border-color: #E4405F; }
.social-instagram .social-icon { color: #E4405F; }
.social-youtube:hover   { background: rgba(255,0,0,0.2); border-color: #FF0000; }
.social-youtube .social-icon { color: #FF0000; }
.social-telegram:hover  { background: rgba(0,136,204,0.2); border-color: #0088cc; }
.social-telegram .social-icon { color: #0088cc; }
.social-viber:hover     { background: rgba(102,92,172,0.2); border-color: #665CAC; }
.social-viber .social-icon { color: #665CAC; }
.social-tiktok:hover    { background: rgba(255,255,255,0.2); border-color: #ffffff; }
.social-tiktok .social-icon { color: #ffffff; }

@keyframes floatSocial {
    0%,100% { transform: translateY(0) rotate(0deg); }
    25%     { transform: translateY(-8px) rotate(2deg); }
    50%     { transform: translateY(-12px) rotate(-2deg); }
    75%     { transform: translateY(-8px) rotate(1deg); }
}

/* Contact info */
.contact-info-block { position: relative; z-index: 5; margin-bottom: 50px; }

.contact-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; max-width: 1000px; margin: 0 auto; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    border-radius: 25px;
    border: 2px solid rgba(255, 165, 112, 0.3);
    transition: all 0.3s ease;
}

.contact-item:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,229,153,0.2); border-color: rgba(255,165,112,0.5); }

.contact-icon { width: 50px; height: 50px; min-width: 50px; display: flex; align-items: center; justify-content: center; background: rgba(255,165,112,0.3); border-radius: 15px; color: var(--color-beige-dark); }
.contact-icon svg { width: 28px; height: 28px; }

.contact-details { display: flex; flex-direction: column; gap: 5px; }
.contact-label { font-size: 0.85rem; color: rgba(255,255,255,0.7); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-value { font-size: 1rem; color: rgba(255,255,255,0.95); font-weight: 600; line-height: 1.5; text-decoration: none; transition: color 0.3s ease; }
.contact-value:hover { color: var(--color-beige-dark); }

/* Locations */
.locations-grid { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 35px; }

.location-card {
    border-radius: 30px;
    padding: 30px;
    border: 2px solid rgba(255, 165, 112, 0.3);
    transition: all 0.4s ease;
}

.location-card:hover { transform: translateY(-10px); box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,229,153,0.2); border-color: rgba(255,165,112,0.5); }

.location-title { font-size: 1.4rem; color: var(--color-beige-dark); margin-bottom: 20px; font-weight: 700; text-shadow: 0 0 20px var(--color-glow-text); }

.location-content { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }

.location-image { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 10px 30px rgba(0,0,0,0.4); border: 2px solid rgba(255,165,112,0.3); }
.location-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.location-card:hover .location-image img { transform: scale(1.1); }

.location-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,105,51,0.95); color: white; padding: 8px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; box-shadow: 0 5px 15px rgba(0,0,0,0.4); }

.location-map { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 10px 30px rgba(0,0,0,0.4); border: 2px solid rgba(255,165,112,0.3); }
.location-map iframe { filter: brightness(0.9) contrast(1.1) saturate(1.2); transition: filter 0.3s ease; }
.location-card:hover .location-map iframe { filter: brightness(1) contrast(1.2) saturate(1.3); }

.location-address { display: flex; align-items: flex-start; gap: 15px; padding: 20px; background: rgba(255,165,112,0.15); border-radius: 20px; margin-bottom: 20px; border: 1px solid rgba(255,165,112,0.2); }

.address-icon { width: 40px; height: 40px; min-width: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,105,51,0.3); border-radius: 12px; color: var(--color-beige-dark); }
.address-icon svg { width: 24px; height: 24px; }
.location-address p { font-size: 1rem; color: rgba(255,255,255,0.95); line-height: 1.6; margin: 0; }

.location-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 30px; background: linear-gradient(135deg, rgba(255,105,51,0.9) 0%, rgba(232,49,0,0.9) 100%); color: white; border: none; border-radius: 25px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.4s cubic-bezier(0.23,1,0.32,1); box-shadow: 0 10px 30px rgba(232,49,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2); position: relative; overflow: hidden; width: 100%; }
.location-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transition: left 0.5s ease; }
.location-btn:hover::before { left: 100%; }
.location-btn:hover { background: linear-gradient(135deg, rgba(255,105,51,1) 0%, rgba(232,49,0,1) 100%); transform: translateY(-3px); box-shadow: 0 15px 40px rgba(232,49,0,0.6), inset 0 1px 0 rgba(255,255,255,0.3); }
.location-btn svg { width: 20px; height: 20px; transition: transform 0.3s ease; }
.location-btn:hover svg { transform: translateX(5px); }

@media (max-width: 768px) {
    .social-links-grid { gap: 15px; }
    .social-link { width: 70px; height: 70px; }
    .social-icon svg { width: 30px; height: 30px; }
}
@media (max-width: 640px) {
    .social-links-grid { gap: 12px; }
    .social-link { width: 65px; height: 65px; }
    .social-icon svg { width: 28px; height: 28px; }
}
@media (max-width: 480px) {
    .social-links-grid { gap: 10px; justify-content: space-around; }
    .social-link { width: 60px; height: 60px; }
    .social-icon svg { width: 26px; height: 26px; }
    .social-name { font-size: 0.75rem; padding: 5px 10px; }
}


/* ==========================================
   CONTACT MODAL
   ========================================== */

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-backdrop.active { opacity: 1; visibility: visible; }

.contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0.9);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    background: linear-gradient(145deg, var(--color-inner-bg-dark) 0%, rgba(31,49,32,0.98) 100%);
    border-radius: var(--radius-md);
    padding: 35px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5), inset 0 2px 0 var(--color-glow-border), 0 0 0 1px var(--color-card-border);
    overflow-y: auto;
    pointer-events: none;
}

.contact-modal.active { opacity: 1; visibility: visible; transform: translate(-50%,-50%) scale(1); pointer-events: auto; }

.modal-bubble { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,165,112,0.15), rgba(232,49,0,0.05)); pointer-events: none; z-index: 0; }
.modal-bubble-1 { width: 120px; height: 120px; top: -30px; right: -30px; animation: floatBubble1 6s ease-in-out infinite; }
.modal-bubble-2 { width: 80px; height: 80px; bottom: -20px; left: -20px; animation: floatBubble2 8s ease-in-out infinite; }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; position: relative; z-index: 1; }
.modal-title  { font-size: 24px; font-weight: 700; color: var(--color-beige-dark); text-shadow: 0 0 20px var(--color-glow-text); margin: 0; }

.modal-close { background: rgba(255,165,112,0.2); border: 1px solid var(--color-card-border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; color: rgba(255,255,255,0.7); font-size: 20px; line-height: 1; }
.modal-close:hover { background: rgba(232,49,0,0.3); border-color: rgba(232,49,0,0.5); color: white; transform: rotate(90deg); }

.modal-form { position: relative; z-index: 1; }
.form-group  { margin-bottom: 20px; }

.form-label { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-label svg { color: var(--color-orange-light); flex-shrink: 0; }

.form-input,
.form-textarea { width: 100%; padding: 14px 18px; background: rgba(20,20,20,0.4); border: 1px solid rgba(255,165,112,0.3); border-radius: 15px; color: white; font-size: 15px; font-family: inherit; transition: all 0.3s ease; backdrop-filter: blur(10px); box-sizing: border-box; }
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,0.4); }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--color-orange-light); background: rgba(20,20,20,0.6); box-shadow: 0 0 0 3px rgba(255,105,51,0.2), inset 0 2px 8px rgba(0,0,0,0.3); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-counter { display: block; text-align: right; font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 5px; }
.form-error   { display: block; color: var(--color-orange-dark); font-size: 12px; margin-top: 5px; min-height: 18px; font-weight: 500; }

.form-actions { display: flex; gap: 12px; margin-top: 25px; }

/* Modal buttons — scoped to avoid conflict with global .btn */
.contact-modal .btn { flex: 1; padding: 14px 24px; border: none; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden; }

.btn-primary { background: linear-gradient(135deg, var(--color-orange-light) 0%, var(--color-orange-dark) 100%); color: white; box-shadow: 0 8px 20px rgba(232,49,0,0.3), inset 0 2px 0 rgba(255,255,255,0.2); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(232,49,0,0.4), inset 0 2px 0 rgba(255,255,255,0.3); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary { background: rgba(255,165,112,0.2); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,165,112,0.3); }
.btn-secondary:hover { background: rgba(255,165,112,0.3); border-color: rgba(255,165,112,0.5); }

.spinner { animation: spinnerRotate 2s linear infinite; width: 20px; height: 20px; }
.spinner-path { stroke: white; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }

@keyframes spinnerRotate { 100% { transform: rotate(360deg); } }
@keyframes dash { 0% { stroke-dasharray: 1,150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90,150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90,150; stroke-dashoffset: -124; } }

.success-message { text-align: center; position: relative; z-index: 1; animation: successAppear 0.5s ease; }
@keyframes successAppear { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.success-icon { width: 80px; height: 80px; background: linear-gradient(135deg, rgba(76,175,80,0.3) 0%, rgba(56,142,60,0.3) 100%); border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; animation: successPulse 1s ease infinite; }
@keyframes successPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.success-icon svg { color: #4CAF50; filter: drop-shadow(0 0 10px rgba(76,175,80,0.5)); }
.success-message h4 { color: var(--color-beige-dark); font-size: 22px; margin-bottom: 10px; }
.success-message p  { color: rgba(255,255,255,0.8); font-size: 15px; margin-bottom: 25px; }

.form-input.invalid, .form-textarea.invalid { border-color: var(--color-orange-dark); animation: shake 0.3s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.form-input.valid, .form-textarea.valid { border-color: #4CAF50; }

@media (max-width: 600px) {
    .contact-modal { width: 95%; padding: 25px 20px; max-height: 95vh; }
    .modal-title { font-size: 20px; }
    .form-actions { flex-direction: column; }
    .modal-bubble-1 { width: 80px; height: 80px; }
    .modal-bubble-2 { width: 60px; height: 60px; }
}

.contact-modal::-webkit-scrollbar       { width: 8px; }
.contact-modal::-webkit-scrollbar-track { background: rgba(20,20,20,0.3); border-radius: 10px; }
.contact-modal::-webkit-scrollbar-thumb { background: rgba(255,165,112,0.5); border-radius: 10px; }
.contact-modal::-webkit-scrollbar-thumb:hover { background: rgba(255,165,112,0.7); }