/* ================================
   CONTACT PAGE - FULLY RESPONSIVE CSS
   All sections optimized for all devices
   ================================ */

/* Contact Form Section */
.contact-form-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.contact-form-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #2d5016;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.contact-form-section h2::before {
    content: '✉️';
    margin-right: 15px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.contact-form-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 20vw, 100px);
    height: 4px;
    background: linear-gradient(90deg, #4a7c23, #a3d977, #4a7c23);
    border-radius: 2px;
}

.contact-form {
    background: white;
    padding: clamp(25px, 5vw, 40px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d5016;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: clamp(10px, 2vw, 12px);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a7c23;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: clamp(12px, 3vw, 15px);
    background: linear-gradient(135deg, #4a7c23 0%, #2d5016 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 35, 0.4);
}

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

/* Team Section */
.team-section {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 20px;
}

.team-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #2d5016;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.team-section h2::before {
    content: '👥';
    margin-right: 15px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.team-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(100px, 25vw, 150px);
    height: 4px;
    background: linear-gradient(90deg, #4a7c23, #a3d977, #4a7c23);
    border-radius: 2px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin-bottom: 60px;
}

.team-card {
    background: white;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    padding-top: 20px;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-image {
    width: clamp(150px, 30vw, 200px);
    height: clamp(150px, 30vw, 200px);
    object-fit: cover;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-radius: 50%;
    margin: 30px auto 0;
    display: block;
    border: 5px solid #4a7c23;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.team-info {
    padding: clamp(20px, 4vw, 25px);
    text-align: center;
}

.team-info h3 {
    color: #2d5016;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 0.5rem;
    text-align: center;
}

.team-info .position {
    color: #4a7c23;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.team-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    word-break: break-word;
}

.team-info .contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.5rem;
    text-align: left;
    justify-content: center;
}

.team-info .icon {
    color: #4a7c23;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Office Locations */
.office-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.office-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #2d5016;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.office-section h2::before {
    content: '📍';
    margin-right: 15px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.office-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(90px, 22vw, 120px);
    height: 4px;
    background: linear-gradient(90deg, #4a7c23, #a3d977, #4a7c23);
    border-radius: 2px;
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(20px, 3vw, 30px);
}

.office-card {
    background: linear-gradient(135deg, #4a7c23 0%, #2d5016 100%);
    color: white;
    padding: clamp(30px, 5vw, 40px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.office-card h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.office-card p {
    line-height: 1.8;
    margin-bottom: 0.8rem;
    text-align: center;
    font-size: clamp(0.85rem, 2vw, 1rem);
    word-break: break-word;
}

/* Map Section */
.map-section {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 20px;
}

.map-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #2d5016;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.map-section h2::before {
    content: '🗺️';
    margin-right: 15px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.map-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(90px, 22vw, 120px);
    height: 4px;
    background: linear-gradient(90deg, #4a7c23, #a3d977, #4a7c23);
    border-radius: 2px;
}

.map-container {
    width: 100%;
    height: clamp(300px, 60vw, 500px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Success Message */
.success-message {
    display: none;
    max-width: 600px;
    margin: 100px auto;
    padding: clamp(30px, 5vw, 40px);
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.success-message h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: white;
}

.success-message p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.back-btn {
    display: inline-block;
    padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 30px);
    background: white;
    color: #2d5016;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: transform 0.3s;
}

.back-btn:hover {
    transform: scale(1.05);
}

/* ================================
   RESPONSIVE BREAKPOINTS
   ================================ */

/* Large Desktop (1440px+) */
@media (min-width: 1441px) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 100px;
        margin-bottom: 100px;
    }
    
    .team-grid {
        gap: 40px;
    }
}

/* Desktop (1024px - 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 60px;
        margin-bottom: 60px;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .office-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 50px;
        margin-bottom: 50px;
        padding: 0 15px;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .office-grid {
        grid-template-columns: 1fr;
    }
    
    .team-image {
        width: 140px;
        height: 140px;
        border: 4px solid #4a7c23;
    }
    
    .map-container {
        height: 350px;
    }
}

/* Mobile (320px - 480px) */
@media (max-width: 480px) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 40px;
        margin-bottom: 40px;
        padding: 0 15px;
    }
    
    .contact-form {
        padding: 20px;
        border-radius: 12px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .office-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-card {
        padding-top: 15px;
    }
    
    .team-image {
        width: 120px;
        height: 120px;
        border: 3px solid #4a7c23;
        margin: 20px auto 0;
    }
    
    .team-info {
        padding: 15px;
    }
    
    .team-info .contact-detail {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .map-container {
        height: 300px;
        border-radius: 12px;
    }
    
    .success-message {
        margin: 50px 15px;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
}

/* Extra Small Mobile (below 360px) */
@media (max-width: 360px) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 30px;
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .contact-form {
        padding: 15px;
    }
    
    .team-image {
        width: 100px;
        height: 100px;
    }
    
    .team-info {
        padding: 12px;
    }
    
    .office-card {
        padding: 25px 20px;
    }
    
    .map-container {
        height: 250px;
    }
}

/* Landscape Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .contact-form-section,
    .team-section,
    .office-section,
    .map-section {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .map-container {
        height: 400px;
    }
}

/* Very Short Landscape */
@media (max-height: 450px) and (orientation: landscape) {
    .team-image {
        width: 100px;
        height: 100px;
    }
    
    .map-container {
        height: 350px;
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
   ================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .team-card,
    .submit-btn,
    .back-btn,
    .form-group input,
    .form-group textarea,
    .form-group select {
        transition: none !important;
    }
    
    .team-card:hover {
        transform: none;
    }
    
    .submit-btn:hover,
    .back-btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .contact-form,
    .team-card {
        border: 2px solid #2d5016;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        border-width: 3px;
    }
    
    .office-card {
        border: 2px solid white;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .contact-form,
    .team-card {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .contact-form-section h2,
    .team-section h2,
    .office-section h2,
    .map-section h2 {
        color: #a3d977;
    }
    
    .team-info h3 {
        color: #a3d977;
    }
    
    .team-info p,
    .form-group label {
        color: #d0d0d0;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
}

/* Print Styles */
@media print {
    .submit-btn,
    .back-btn,
    .map-container {
        display: none;
    }
    
    .team-card,
    .office-card,
    .contact-form {
        box-shadow: none;
        break-inside: avoid;
    }
    
    .team-section,
    .office-section {
        page-break-inside: avoid;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .submit-btn,
    .back-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
