/* ========================================
   Enhanced Custom CSS for Contact Us Page
   Modern UI with Improved Visual Design
   ======================================== */

/* ===== CSS Variables ===== */
:root {
    --primary-red: #cb0c0c;
    --secondary-red: #952624;
    --dark-red: #6b1a18;
    --light-red: #ff4444;
    --white: #ffffff;
    --off-white: #fafafa;
    --light-gray: #f5f7fa;
    --medium-gray: #e8ecef;
    --text-gray: #6c757d;
    --text-dark: #2c3e50;
    --border-color: #dee2e6;
    --input-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === FINAL FIX FOR FORM VALIDATION === */

/* Default hidden */
.invalid-feedback {
  display: none;
  font-size: 0.875rem;
  color: #dc3545;
  margin-top: 6px;
  line-height: 1.4;
}

/* ✅ Show feedback when input/select has .is-invalid, even inside wrappers */
.input-icon-wrapper .form-control.is-invalid ~ .invalid-feedback,
.input-icon-wrapper .form-select.is-invalid ~ .invalid-feedback,
.form-group-modern .form-control.is-invalid ~ .invalid-feedback,
.form-group-modern .form-select.is-invalid ~ .invalid-feedback,
.form-group-modern textarea.form-control.is-invalid ~ .invalid-feedback {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* For cases where invalid-feedback is outside wrapper (like yours) */
.form-group-modern .form-control.is-invalid,
.form-group-modern .form-select.is-invalid,
.form-group-modern textarea.is-invalid {
  border-color: #dc3545 !important;
}

/* Smooth fade-in effect */
.invalid-feedback {
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
  opacity: 1;
  transform: translateY(0);
}

/* Remove Bootstrap’s green success styling */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #ced4da !important;
  box-shadow: none !important;
  background-image: none !important;
}

 
/* ===== Enhanced Header Section ===== */
.cntbanner {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

/* .cntbanner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
} */

.contact-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    width: 100%;
}

.contact-text-wrapper {
    text-align: center;
    z-index: 3;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

.contact-title {
     font-size: 2.6rem;
    font-weight: 700;
    color: var(--white);
    margin: 0.5rem 0;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.contact-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.5px;
}
 
.contact-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

/* ===== Main Contact Section ===== */
.form-section {
    padding: 60px 0;
}

/* ===== Enhanced Contact Form Wrapper ===== */
.contact-form-wrapper {
    background: var(--white);
    padding: 26px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

 

.contact-form-wrapper:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.form-header {
   
    padding-bottom: 10px;
  
}

.form-title {
 
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-red);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon-small {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.form-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

/* ===== Enhanced Form Inputs ===== */
.form-group-modern {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.input-icon-wrapper,
.textarea-wrapper {
    position: relative;
    transition: var(--transition);
}

.input-icon-wrapper.focused,
.textarea-wrapper.focused {
    transform: translateY(-2px);
}

.input-icon,
.textarea-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.1rem;
    transition: var(--transition);
    z-index: 2;
}

.textarea-icon {
    top: 18px;
    transform: none;
}

.input-icon-wrapper.focused .input-icon,
.textarea-wrapper.focused .textarea-icon {
    color: var(--primary-red);
}

.custom-input,
.custom-textarea {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--input-bg);
    transition: var(--transition);
}

.custom-input:focus,
.custom-textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(203, 12, 12, 0.1);
    outline: none;
    background-color: var(--white);
}

.custom-input::placeholder,
.custom-textarea::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

.custom-textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 14px;
}

/* Select Dropdown Styling */
.form-select.custom-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 12px;
    cursor: pointer;
}

/* ===== Enhanced Submit Button ===== */
.btn-submit {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--secondary-red) 0%, var(--primary-red) 100%);
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: capitalize;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== Success Message ===== */
.alert-success {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: var(--shadow-sm);
}

/* ===== Map Section Wrapper ===== */
.map-section-wrapper {
    height: 100%;
}

/* ===== Contact Info Cards ===== */
.contact-info-cards {
    margin-bottom: 25px;
}

.info-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-red);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.info-card:hover .info-icon {
    transform: scale(1.1) rotate(5deg);
}

.info-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

/* ===== Enhanced Map Wrapper ===== */
.map-wrapper {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.map-wrapper:hover {
    box-shadow: var(--shadow-lg);
}

.map-header {
    background: linear-gradient(135deg, var(--secondary-red) 0%, var(--primary-red) 100%);
    padding: 15px 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-header i {
    font-size: 1.2rem;
}

.map-container {
    width: 100%;
    height: 450px;
    position: relative;
}

.google-map {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes floatLeft {
    0%, 100% {
        transform: rotate(-30deg) translateY(0);
    }
    50% {
        transform: rotate(-30deg) translateY(-20px);
    }
}

@keyframes floatRight {
    0%, 100% {
        transform: rotate(30deg) translateY(0);
    }
    50% {
        transform: rotate(30deg) translateY(-20px);
    }
}

/* ===== Responsive Design ===== */

/* Desktop (≥ 992px) - Default styles above */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .contact-title {
        font-size: 2.5rem;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
    
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-form-wrapper {
        padding: 35px;
        margin-bottom: 30px;
    }
    
    .form-title {
        font-size: 1.65rem;
    }
    
    .contact-info-cards {
        margin-bottom: 20px;
    }
    
    .map-container {
        height: 400px;
    }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
    .cntbanner {
        min-height: 160px;
    }
    
    .contact-content {
        padding: 45px 20px;
    }
    
    .contact-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .title-icon {
        font-size: 2rem;
    }
    
    .contact-subtitle {
        font-size: 0.95rem;
    }
    
    .diagonal-shape {
        width: 200px;
        height: 150px;
    }
    
    .contact-section {
        padding: 40px 0;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
    
    .custom-input,
    .custom-textarea {
        padding: 12px 16px 12px 44px;
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: 14px 25px;
        font-size: 1rem;
    }
    
    .info-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .info-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .map-container {
        height: 350px;
    }
}

/* Extra Small Mobile (≤ 576px) */
@media (max-width: 576px) {
    .form-section{padding: 40px 0;}
    .cntbanner {
        min-height: 116px;
    }
    
    .contact-content {
        padding: 15px 0;
    }
    
    .contact-title {
        font-size: 1.75rem;
    }
    
    .title-icon {
        font-size: 1.75rem;
    }
    
    .contact-subtitle {
        font-size: 0.9rem;
    }
    
    .diagonal-shape {
        width: 150px;
        height: 120px;
    }
    
    .diagonal-left {
        left: -60px;
    }
    
    .diagonal-right {
        right: -60px;
    }
    
    .contact-section {
        padding: 30px 0;
    }
    
    .contact-form-wrapper {
        padding: 25px 15px;
    }
    
    .form-header {
        padding-bottom: 20px;
    }
    
    .form-title {
        font-size: 1.35rem;
           align-items: flex-start;
        gap: 5px;
    }
    
    .title-icon-small {
        font-size: 1.3rem;
    }
    
    .form-subtitle {
        font-size: 0.85rem;
    }
    
    .custom-input,
    .custom-textarea {
        padding: 11px 14px 11px 42px;
        font-size: 0.875rem;
        border-radius: 8px;
    }
    
    .input-icon,
    .textarea-icon {
        left: 14px;
        font-size: 1rem;
    }
    
    .custom-textarea {
        min-height: 100px;
    }
    
    .btn-submit {
        padding: 13px 20px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .contact-info-cards .row {
        gap: 0;
    }
    
    .info-card {
        padding: 18px 12px;
    }
    
    .info-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .info-title {
        font-size: 0.95rem;
    }
    
    .info-text {
        font-size: 0.8rem;
    }
    
    .map-header {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .map-container {
        height: 300px;
    }
}

/* ===== Form Validation Styles ===== */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

 
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Loading Spinner ===== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: var(--white);
    }
    
    .cntbanner {
        background: var(--white) !important;
        color: #000 !important;
    }
    
    .contact-title,
    .contact-subtitle {
        color: #000 !important;
    }
    
    .diagonal-shape,
    .contact-pattern {
        display: none;
    }
    
    .btn-submit {
        display: none;
    }
    
    .map-wrapper,
    .contact-info-cards {
        display: none;
    }
    
    .contact-form-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-red) 0%, var(--dark-red) 100%);
}