/* Google Font & Base Reset */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* Contact Section & Layout Container */
.contact-section {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: auto;
}

.container-custom {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
    width: 100%;
    justify-content: center;
}

/* --- MAIN BORDER LOGIC START (For Cards & Map) --- */
.contact-card,
.map-container {
    border: 2px solid #e5e7eb;
    /* Same 2px Border */
    transition: all 0.4s ease;
}

html.dark .contact-card,
html.dark .map-container {
    border-color: #334155;
    /* Dark mode Normal border */
}

/* Hover & Active Border (Blue) */
.contact-card:hover,
.contact-card:active,
.map-container:hover,
.map-container:active {
    border-color: #2563eb !important;
}

html.dark .contact-card:hover,
html.dark .contact-card:active,
html.dark .map-container:hover,
html.dark .map-container:active {
    border-color: #60a5fa !important;
}

/* --- MAIN BORDER LOGIC END --- */

.contact-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    height: 100%;
}

html.dark .contact-card {
    background: #1e293b;
}

html.dark .card-title {
    color: #fff;
}

html.dark .sub-text,
html.dark .info-text .value {
    color: #cbd5e1;
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
}

.card-title {
    font-size: 1.5rem;
    color: #111827;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.card-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: #2563eb;
    bottom: -8px;
    left: 0;
    border-radius: 2px;
}

.sub-text {
    font-size: 1.05rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 35px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    display: flex;
    align-items: center;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: 0.3s;
    flex-shrink: 0;
}

.contact-card:hover .icon-circle {
    background: #2563eb;
    color: white;
    transform: rotate(360deg);
}

.info-text .label {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 500;
}

.info-text .value {
    font-size: 1.05rem;
    color: #374151;
    font-weight: 600;
    text-decoration: none;
}

.value.link:hover {
    color: #2563eb;
}

.social-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.s-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
    font-size: 1.1rem;
}

.s-btn:hover {
    color: white;
    transform: translateY(-3px);
}

.linkedin:hover {
    background: #0077b5;
}

.github:hover {
    background: #333;
}

.twitter:hover {
    background: #000;
}

.email:hover {
    background: #ea4335;
}

.instagram:hover {
    background: #e4405f;
}

.whatsapp:hover {
    background: #25D366;
}

.input-box {
    position: relative;
    width: 100%;
    margin-bottom: 35px;
}

.input-box input,
.input-box textarea {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    color: #1f2937;
    transition: 0.3s;
}

.input-box textarea {
    height: 140px;
    resize: none;
    padding-top: 15px;
}

.input-box span {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1rem;
    color: #9ca3af;
    transition: 0.3s;
    background: #ffffff;
    padding: 0 5px;
}

.input-box textarea~span {
    top: 24px;
    transform: none;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: 0.3s;
    pointer-events: none;
}

.input-box textarea~.input-icon {
    top: 24px;
    transform: none;
}

.input-box input:focus,
.input-box textarea:focus,
.input-box input:valid,
.input-box textarea:valid {
    border-color: #2563eb;
    border-width: 2px;
}

.input-box input:focus~span,
.input-box textarea:focus~span,
.input-box input:valid~span,
.input-box textarea:valid~span {
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    top: 0;
    left: 20px;
    transform: translateY(-50%);
    z-index: 10;
}

.input-box input:focus~.input-icon,
.input-box textarea:focus~.input-icon {
    color: #2563eb;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.map-section {
    width: 100%;
    padding: 0 0 60px 0;
    display: flex;
    justify-content: center;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    filter: grayscale(100%);
    transition: filter 0.5s ease-in-out, border-color 0.4s ease;
}

.map-container:hover {
    filter: grayscale(0%);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    object-fit: contain;
}

.success-heading {
    color: #28a745;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-close-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 20px 5px !important;
    }

    .container-custom {
        padding: 0 5px !important;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .contact-card {
        width: 100% !important;
        padding: 15px !important;
        border-radius: 20px !important;
    }

    .info-text .value {
        font-size: 0.82rem !important;
        word-break: break-all !important;
    }

    .card-title {
        font-size: 1.3rem !important;
    }

    .social-icons {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .s-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
    }
}

/* Hire Me Button: Structural & Animation Logic */
.hire-me-btn {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 2px solid #2563eb !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
}

/* Hover Animation: Lift & Shadow */
.hire-me-btn:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.2) !important;
}

/* Active State: Blue Fill & Scale Down on Click */
.hire-me-btn:active {
    transform: scale(0.95) !important;
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* Dark Mode Interface Logic */
html.dark .project-inquiry-box {
    border-top-color: #334155;
}

html.dark .hire-me-btn {
    background: transparent !important;
    border-color: #60a5fa !important;
    color: #60a5fa !important;
}

html.dark .hire-me-btn:active {
    background-color: #60a5fa !important;
    color: #0f172a !important;
}