/* Base styles from style.css that contact.html needs */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Contact Page Specific Styles */
.contact-hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.contact-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.contact-main {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.contact-info-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.contact-info-card h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    color: #3498db;
    flex-shrink: 0;
}

.contact-details h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
}

.contact-details p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Authentication Section */
.auth-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.auth-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.auth-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

/* Google Sign-In Button Container */
.google-signin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

/* Style the Google button container */
#g_id_signin {
    display: inline-block;
}

/* Loading state for the signin area */
.signin-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.signin-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e1e8ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #3498db;
}

.user-details h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.user-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

.contact-form-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form-card h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #f8f9fa;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
}

textarea.form-control {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.social-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e8ed;
}

.social-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: #3498db;
    transform: translateY(-3px);
}

.social-link:hover svg {
    stroke: white;
}

.back-to-home {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    z-index: 1000;
}

.back-to-home:hover {
    background: #3498db;
    color: white;
    transform: scale(1.05);
}

.hidden {
    display: none;
}

.security-notice {
    background: #e8f5e8;
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.security-notice .notice-icon {
    color: #27ae60;
    margin-right: 8px;
}

.error-message {
    background: #fee;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c0392b;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-hero h1 {
        font-size: 36px;
    }
    
    .contact-hero p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 60px 0;
    }
    
    .contact-hero h1 {
        font-size: 32px;
    }
    
    .contact-hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .contact-main {
        padding: 40px 0;
    }
    
    .contact-info-card,
    .contact-form-card,
    .auth-section {
        padding: 30px 20px;
    }
    
    .contact-grid {
        gap: 30px;
    }
    
    .contact-info-card h2,
    .contact-form-card h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .contact-item {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .contact-details h3 {
        font-size: 16px;
    }
    
    .contact-details p {
        font-size: 14px;
    }
    
    .form-control {
        padding: 12px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .back-to-home {
        position: static;
        display: inline-block;
        margin: 20px auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .contact-hero {
        padding: 40px 0;
    }
    
    .contact-hero h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .contact-hero p {
        font-size: 14px;
    }
    
    .contact-main {
        padding: 30px 0;
    }
    
    .contact-info-card,
    .contact-form-card,
    .auth-section {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .contact-info-card h2,
    .contact-form-card h2 {
        font-size: 22px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 10px;
    }
    
    textarea.form-control {
        height: 100px;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .social-section {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .back-to-home {
        padding: 10px 15px;
        font-size: 14px;
        margin: 15px auto;
    }
}

/* Print Styles */
@media print {
    .back-to-home,
    .submit-btn,
    .social-links {
        display: none;
    }
    
    .contact-hero {
        background: none;
        color: #000;
        padding: 20px 0;
    }
    
    .contact-main {
        background: none;
        padding: 20px 0;
    }
    
    .contact-info-card,
    .contact-form-card {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 20px;
    }
    
    .contact-grid {
        gap: 30px;
    }
}

/* Form Animation Enhancements */
.form-group {
    position: relative;
    transition: transform 0.2s ease;
}

.form-group:focus-within {
    transform: translateY(-1px);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Loading States */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success States */
.submit-btn.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Accessibility Improvements */
.contact-item:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.social-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.back-to-home:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-hero {
        background: #000;
        color: #fff;
    }
    
    .contact-item {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
    
    .submit-btn {
        background: #000;
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .contact-item:hover,
    .submit-btn:hover,
    .social-link:hover,
    .back-to-home:hover {
        transform: none;
    }
}