/* ===============================================
   Contact Page Modern Styles
   =============================================== */

:root {
    --primary-color: #2d7a3e;
    --primary-dark: #1e5a2d;
    --primary-light: #3d9a4e;
    --secondary-color: #4a5568;
    --accent-color: #48bb78;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --error-color: #f56565;
    --success-color: #48bb78;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper */
.contact-wrapper {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 2rem 1rem;
}

/* Header Section */
.contact-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    text-align: center;
    position: relative;
    padding: 3rem 1rem;
    overflow: hidden;
}

.contact-header-content {
    position: relative;
    z-index: 2;
}

.contact-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.8s ease-out;
}

.contact-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    margin: 0;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Decorative Circles */
.contact-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: -30px;
    left: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: -30px;
    animation-delay: 4s;
}

/* Container */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

/* Info Section */
.contact-info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.info-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.info-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.info-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.info-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* Form Section */
.contact-form-section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-form {
    width: 100%;
}

/* Messages */
.messages {
    margin-bottom: 2rem;
}

.message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    animation: slideInRight 0.5s ease-out;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Labels */
.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.label-required {
    color: var(--error-color);
    font-size: 1.1rem;
}

/* Input Wrapper */
.input-wrapper,
.textarea-wrapper {
    position: relative;
    transition: var(--transition);
}

.input-wrapper input,
.textarea-wrapper textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
    font-family: inherit;
}

.textarea-wrapper textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.input-wrapper input:focus,
.textarea-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.input-wrapper.focused,
.textarea-wrapper.focused {
    transform: translateY(-2px);
}

/* Input Icons */
.input-icon,
.textarea-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: var(--transition);
    pointer-events: none;
}

.textarea-icon {
    top: 1.25rem;
    transform: none;
}

.input-wrapper.focused .input-icon,
.textarea-wrapper.focused .textarea-icon,
.input-wrapper input:focus + .input-icon,
.textarea-wrapper textarea:focus + .textarea-icon {
    color: var(--primary-color);
}

/* Error States */
.form-group.has-error .input-wrapper input,
.form-group.has-error .textarea-wrapper textarea {
    border-color: var(--error-color);
    background: #fff5f5;
}

.error-message {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--error-color);
    animation: shake 0.5s ease-in-out;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading {
    pointer-events: none;
}

.btn-content,
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.submit-btn.loading .btn-content {
    opacity: 0;
}

.submit-btn.loading .btn-loading {
    display: flex;
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* Spinner Animation */
.spinner {
    animation: rotate 2s linear infinite;
    width: 30px;
    height: 30px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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 slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ===============================================
   Responsive Design
   =============================================== */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .contact-wrapper {
        padding: 3rem 2rem;
    }
    
    .contact-header {
        padding: 4rem 2rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .contact-info-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-form-section {
        padding: 3rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .contact-wrapper {
        padding: 4rem 2rem;
    }
    
    .contact-container {
        grid-template-columns: 350px 1fr;
        gap: 3rem;
    }
    
    .contact-info-section {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem 2rem;
    }
    
    .info-icon {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .info-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .contact-header {
        padding: 5rem 2rem;
    }
    
    .contact-form-section {
        padding: 4rem;
    }
}

/* RTL Support */
[dir="rtl"] .input-wrapper input,
[dir="rtl"] .textarea-wrapper textarea {
    padding: 1rem 3rem 1rem 1rem;
}

[dir="rtl"] .input-icon,
[dir="rtl"] .textarea-icon {
    left: auto;
    right: 1rem;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a202c;
        --bg-white: #2d3748;
        --text-color: #e2e8f0;
        --text-light: #a0aec0;
        --border-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .contact-wrapper {
        background: white;
    }
    
    .contact-decoration,
    .submit-btn {
        display: none;
    }
    
    .contact-form-section,
    .info-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
