/* ============================================
   Agritrend Contact Us Page - Modern Design
   Uses Porto Theme Colors & Design System
   ============================================ */

/* ============================================
   BASE STYLES & TYPOGRAPHY
   ============================================ */

.contact-index-index .page-main {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hide default title as we'll use custom hero */
.contact-index-index .page-title-wrapper {
    display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */

.contact-hero {
    background: linear-gradient(135deg, #1F2E44 0%, #2B3F5C 100%);
    color: #ffffff;
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.contact-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.contact-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.contact-hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.contact-hero-subtitle {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 16px 0;
    opacity: 0.95;
}

.contact-hero-description {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CONTACT INFO CARDS
   ============================================ */

.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin: -40px auto 60px;
    max-width: 1200px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.contact-info-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: #1F2E44;
}

.contact-info-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1F2E44 0%, #2B3F5C 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(31, 46, 68, 0.3);
}

.contact-info-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.contact-info-card p {
    font-size: 16px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

.contact-info-card a {
    color: #1F2E44;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-info-card a:hover {
    color: #2B3F5C;
    text-decoration: underline;
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */

.contact-main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.contact-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}

/* ============================================
   FORM SECTION
   ============================================ */

.contact-form-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.contact-form-section .legend {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 32px 0;
    letter-spacing: -0.02em;
    border: none;
    padding: 0;
    display: block;
}

.contact-form-section .legend b {
    color: #1F2E44;
}

/* Form Inputs */
.contact-form-section .field {
    margin-bottom: 24px;
}

.contact-form-section .label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: block;
}

.contact-form-section .label span {
    display: inline-block;
}

.contact-form-section .input-text,
.contact-form-section textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #1a1a1a;
}

.contact-form-section .input-text:focus,
.contact-form-section textarea:focus {
    outline: none;
    border-color: #1F2E44;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 46, 68, 0.1);
}

.contact-form-section textarea {
    min-height: 180px;
    resize: vertical;
}

/* Submit Button */
.contact-form-section .actions-toolbar {
    margin-top: 32px;
}

.contact-form-section .action.submit.primary {
    width: 100%;
    background: linear-gradient(135deg, #1F2E44 0%, #2B3F5C 100%);
    color: #ffffff;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(31, 46, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form-section .action.submit.primary:hover {
    background: linear-gradient(135deg, #2B3F5C 0%, #3A4F6C 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 46, 68, 0.4);
}

.contact-form-section .action.submit.primary:active {
    transform: translateY(0);
}

/* Required Field Indicator */
.contact-form-section .field.required .label::after {
    content: " *";
    color: #1F2E44;
    font-weight: 700;
}

/* ============================================
   SIDEBAR SECTION
   ============================================ */

.contact-sidebar {
    position: sticky;
    top: 100px;
}

.contact-sidebar-card {
    background: #f9fafb;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #e5e7eb;
    margin-bottom: 32px;
}

.contact-sidebar-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #1F2E44;
}

.contact-detail-item {
    display: flex;
    align-items: start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.contact-detail-item:last-child {
    margin-bottom: 0;
}

.contact-detail-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1F2E44 0%, #2B3F5C 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
    color: #ffffff;
}

.contact-detail-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.contact-detail-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.contact-detail-content a {
    color: #1F2E44;
    text-decoration: none;
    font-weight: 600;
}

.contact-detail-content a:hover {
    text-decoration: underline;
}

/* Business Hours */
.business-hours {
    list-style: none;
    padding: 0;
    margin: 0;
}

.business-hours li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
}

.business-hours li:last-child {
    border-bottom: none;
}

.business-hours .day {
    font-weight: 600;
    color: #1a1a1a;
}

.business-hours .hours {
    color: #666;
}

.business-hours .today {
    color: #1F2E44;
    font-weight: 700;
}

/* ============================================
   GOOGLE MAP
   ============================================ */

.contact-map-wrapper {
    margin: 0 0 60px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 4px solid #ffffff;
}

#store_map {
    min-height: 450px !important;
    width: 100%;
    border-radius: 16px;
}

/* ============================================
   WHY CONTACT US SECTION
   ============================================ */

.why-contact-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 80px 24px;
    margin: 60px 0 0 0;
}

.why-contact-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.why-contact-content h2 {
    font-size: 40px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.why-contact-content .subtitle {
    font-size: 20px;
    color: #666;
    margin: 0 0 60px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 32px 24px;
}

.feature-item-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1F2E44 0%, #2B3F5C 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(31, 46, 68, 0.25);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.feature-item p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   FAQ SECTION
   ============================================ */

.contact-faq-section {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.contact-faq-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 48px 0;
}

.faq-item {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 24px;
    margin: 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #1F2E44;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 24px 24px;
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* ============================================
   VALIDATION MESSAGES
   ============================================ */

.contact-form-section .mage-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.contact-form-section .field.error .input-text,
.contact-form-section .field.error textarea {
    border-color: #dc2626;
    background: #E8EDF3;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.message.success {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    color: #047857;
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .contact-hero {
        padding: 80px 20px 60px;
    }

    .contact-hero h1 {
        font-size: 44px;
    }

    .contact-content-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-sidebar {
        position: static;
    }

    .contact-info-cards {
        margin-top: -30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .contact-hero {
        padding: 60px 16px 50px;
    }

    .contact-hero h1 {
        font-size: 36px;
    }

    .contact-hero-subtitle {
        font-size: 20px;
    }

    .contact-hero-description {
        font-size: 16px;
    }

    .contact-info-cards {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
        margin-top: -30px;
    }

    .contact-form-section {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .contact-form-section .legend {
        font-size: 26px;
    }

    .contact-sidebar-card {
        padding: 32px 24px;
    }

    #store_map {
        min-height: 350px !important;
    }

    .why-contact-content h2 {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .contact-hero h1 {
        font-size: 30px;
    }

    .contact-form-section {
        padding: 24px 20px;
    }

    .contact-form-section .input-text,
    .contact-form-section textarea {
        padding: 14px 16px;
    }

    .contact-info-card {
        padding: 32px 24px;
    }

    .contact-detail-item {
        padding: 16px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .contact-hero,
    .contact-info-cards,
    .why-contact-section,
    .contact-faq-section,
    #store_map {
        display: none;
    }

    .contact-form-section,
    .contact-sidebar-card {
        box-shadow: none;
        border: 1px solid #333;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

.contact-form-section .input-text:focus-visible,
.contact-form-section textarea:focus-visible {
    outline: 3px solid #1F2E44;
    outline-offset: 2px;
}

.contact-form-section .action.submit.primary:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-hero {
        background: #000000;
        border: 2px solid #ffffff;
    }

    .contact-info-card,
    .contact-form-section,
    .contact-sidebar-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
