/* Contact Page Specific Styles */

.contact-section {
    padding: var(--spacing-xl) 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Contact Info */
.contact-info h2 {
    color: var(--primary-black);
    margin-bottom: var(--spacing-lg);
}

.contact-details {
    margin: var(--spacing-lg) 0;
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--kenya-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--primary-black);
}

.contact-text a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.contact-text a:hover {
    text-decoration: underline;
}

.contact-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Quick Links */
.quick-links {
    margin-top: var(--spacing-xl);
}

.quick-links h3 {
    color: var(--primary-black);
    margin-bottom: var(--spacing-md);
}

.link-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.link-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    text-align: center;
}

/* Contact Form */
.contact-form-container {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form-container h2 {
    color: var(--primary-black);
    margin-bottom: var(--spacing-sm);
}

.contact-form-container > p {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

/* Additional Info */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.info-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: var(--spacing-md);
}

.info-card h3 {
    color: var(--primary-black);
    margin-bottom: var(--spacing-sm);
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Map Container */
.map-container {
    margin-top: var(--spacing-xl);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-black);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .link-buttons .btn {
        width: 100%;
    }
    
    .additional-info {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Form Styles */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-black);
    font-size: 0.95rem;
}

.form-group label.required::after {
    content: " *";
    color: var(--primary-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(187, 0, 0, 0.1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b0b0b0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Select dropdown styling */
.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='%23BB0000' 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 16px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* Form validation states */
.form-group input:invalid:not(:focus):not(:placeholder-shown),
.form-group select:invalid:not(:focus),
.form-group textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ff4444;
}

.form-group input:valid:not(:focus):not(:placeholder-shown),
.form-group select:valid:not(:focus),
.form-group textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: var(--primary-green);
}

/* Form buttons */
.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid #eee;
}

.form-submit-btn,
.form-reset-btn {
    padding: 14px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-submit-btn {
    background: var(--kenya-red);
    color: white;
    flex: 1;
}

.form-submit-btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 0, 0, 0.3);
}

.form-submit-btn:active {
    transform: translateY(0);
}

.form-reset-btn {
    background: #f8f9fa;
    color: var(--text-color);
    border: 2px solid #e0e0e0;
}

.form-reset-btn:hover {
    background: #e9ecef;
    border-color: #b0b0b0;
}

/* Form header */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.form-header h2 {
    color: var(--primary-black);
    margin-bottom: var(--spacing-sm);
    font-size: 1.8rem;
}

.form-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Form sections */
.form-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-section-title {
    color: var(--primary-black);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--kenya-red);
    font-size: 1.3rem;
}

/* Checkbox and radio styling */
.form-check-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.form-check-group input[type="checkbox"],
.form-check-group input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-check-group label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-grid,
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-red);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Loading state */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.form-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: form-spin 1s linear infinite;
    z-index: 1;
}

@keyframes form-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success/Error messages */
.form-message {
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    display: block;
}

/* Field hints and errors */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--primary-red);
    display: none;
}

.form-group.has-error .form-error {
    display: block;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--primary-red);
}

/* Form groups with icons */
.form-group.with-icon {
    position: relative;
}

.form-group.with-icon input,
.form-group.with-icon select {
    padding-left: 45px;
}

.form-group.with-icon .form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.form-group.with-icon:focus-within .form-icon {
    color: var(--primary-red);
}

/* Custom file upload */
.form-file-upload {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.form-file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.form-file-upload label {
    display: block;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 2px dashed #e0e0e0;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-file-upload label:hover {
    background: #e9ecef;
    border-color: var(--primary-red);
}

.form-file-upload .file-name {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Date input styling */
input[type="date"] {
    appearance: none;
    padding-right: 16px;
}

/* Range input styling */
input[type="range"] {
    height: 6px;
    padding: 0;
    border: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Custom form themes */
.form-theme-kenya .form-submit-btn {
    background: linear-gradient(135deg, 
        var(--primary-black) 0%,
        var(--primary-red) 50%,
        var(--primary-green) 100%);
}

.form-theme-kenya .form-section-title {
    background: linear-gradient(135deg, 
        var(--primary-black) 0%,
        var(--primary-red) 50%,
        var(--primary-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-submit-btn,
    .form-reset-btn {
        width: 100%;
    }
    
    .form-section {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .form-submit-btn,
    .form-reset-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}