.page-header {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, 
        rgba(128, 0, 32, 0.9), 
        rgba(96, 0, 24, 0.9)),
        url('https://images.unsplash.com/photo-1565374396837-29e2df5d1caf?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    color: var(--text-white);
    text-align: center;
    overflow: hidden;
    z-index: 1; 
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.page-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.contact-content {
    padding: 80px 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    position: relative;
    z-index: 2;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.contact-info h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.contact-desc {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.contact-details {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border: 1px solid rgba(128, 0, 32, 0.05);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(128, 0, 32, 0.05);
    transition: all 0.3s ease;
}

.contact-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(128, 0, 32, 0.2);
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--secondary-color), #b89f30);
}

.contact-text h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-text p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 0;
}

.contact-text strong {
    color: var(--text-dark);
    font-weight: 600;
}

.emergency-contact {
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.05), rgba(212, 175, 55, 0.05));
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.emergency-contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.emergency-contact h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.emergency-contact p {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-contact p::before {
    content: '📞';
    font-size: 1.2rem;
}

.contact-form-container {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(128, 0, 32, 0.05);
    position: relative;
    z-index: 5;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.contact-form-container h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.contact-form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(128, 0, 32, 0.1);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.1);
    transform: translateY(-2px);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23800020' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    padding-right: 50px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.error-message::before {
    content: '⚠';
}

.form-group input.error, 
.form-group textarea.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: var(--text-dark);
}

.checkbox-label input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.contact-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    margin-top: 10px;
    color: var(--text-white);
    cursor: pointer;
}

.contact-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(128, 0, 32, 0.2);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.contact-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}


.contact-form .btn-secondary{
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    margin-top: 10px;
    color: var(--text-white);
    cursor: pointer;
}

.map-section {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.map-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 40px;
    position: relative;
}

.map-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.map-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 2px dashed rgba(128, 0, 32, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.map-placeholder:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero1.JPG');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.map-content {
    text-align: center;
    padding: 40px;
    position: relative;
    z-index: 2;
    background: transparent;
    border-radius: 10px;
}

.map-content i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s infinite;
}

.map-content h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.map-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    max-width: 500px;
    line-height: 1.7;
    margin-left: auto;
    margin-right: auto;
}

.map-content .btn-outline {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
}

.map-content .btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(128, 0, 32, 0.15);
}

.regional-contacts {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.regional-contacts h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 50px;
    position: relative;
}

.regional-contacts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.regional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.regional-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(128, 0, 32, 0.05);
    position: relative;
    overflow: hidden;
}

.regional-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(128, 0, 32, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.regional-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.regional-card:hover::before {
    opacity: 1;
}

.regional-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.regional-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.regional-card p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.regional-card p strong {
    color: var(--text-dark);
    font-weight: 600;
    min-width: 90px;
    display: inline-block;
}

/* ADDED: Styling for the Error Block */
#formError {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 5px solid #dc3545;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

#formError i {
    font-size: 1.5rem;
    color: #dc3545;
}

/* ADDED: Styling for the Loading Block */
#formLoading {
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
    margin-top: 15px;
    font-weight: 500;
}

#formLoading .loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* FIX: Success block display and styling */
#formSuccess {
    background: #ffffff !important;
    color: #333 !important;
    border: none !important;
    border-left: 6px solid #28a745 !important; /* Changed from secondary-color to green for success */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; /* Softened shadow so it doesn't look like a glitch */
    padding: 30px !important;
    border-radius: 12px !important;
    margin-top: 20px;
    position: relative;
}

#formSuccess h4 {
    color: #28a745 !important;
    font-family: var(--font-heading);
    font-size: 1.5rem !important;
    margin-bottom: 15px;
}

#formSuccess i.fa-check-circle {
    color: #28a745 !important; 
    font-size: 3rem !important;
    margin-bottom: 15px !important;
}

#formSuccess .success-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

#formSuccess .close-success {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

#formSuccess .close-success:hover {
    color: #333;
}


#formSuccess .success-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

#formSuccess .close-success {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

#formSuccess .close-success:hover {
    color: #333;
}

@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 bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 1200px) {
    .contact-wrapper {
        gap: 40px;
    }
    
    .map-placeholder {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 3rem;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-info h2,
    .contact-form-container h2 {
        font-size: 2rem;
    }
    
    .map-placeholder {
        height: 300px;
    }
    
    .regional-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 60px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .contact-content {
        padding: 60px 0;
    }
    
    .contact-info h2,
    .contact-form-container h2,
    .map-section h2,
    .regional-contacts h2 {
        font-size: 1.8rem;
    }
    
    .contact-details {
        padding: 25px;
    }
    
    .contact-form-container {
        padding: 30px;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-icon {
        align-self: flex-start;
    }
    
    .map-placeholder {
        height: 250px;
    }
    
    .map-content {
        padding: 30px 20px;
    }
    
    .map-content i {
        font-size: 2.5rem;
    }
    
    .map-content h3 {
        font-size: 1.3rem;
    }
    
    .regional-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .contact-content {
        padding: 40px 0;
    }
    
    .contact-wrapper {
        margin-bottom: 50px;
    }
    
    .contact-info h2,
    .contact-form-container h2,
    .map-section h2,
    .regional-contacts h2 {
        font-size: 1.6rem;
    }
    
    .contact-desc {
        font-size: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .contact-text h3 {
        font-size: 1.1rem;
    }
    
    .contact-form-container {
        padding: 25px 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .map-placeholder {
        height: 200px;
    }
    
    .map-content {
        padding: 20px 15px;
    }
    
    .map-content i {
        font-size: 2rem;
    }
    
    .map-content h3 {
        font-size: 1.2rem;
    }
    
    .map-content p {
        font-size: 0.9rem;
    }
    
    .regional-card {
        padding: 25px 20px;
    }
    
    .regional-card h3 {
        font-size: 1.2rem;
    }
    
    .regional-card p {
        font-size: 0.9rem;
    }
}