/* ==========================================
   CONTACT PAGE STYLES
   Scaled to match homepage compact style
   Legacy Protection Services
   WITH STANDARDIZED TITLES & IMPROVED CHECKBOX
========================================== */

/* ------------------------------------------
   REVEAL ANIMATIONS
------------------------------------------ */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------
   SECTION INTRO - STANDARDIZED TITLES (matching homepage)
------------------------------------------ */
.contact-section .section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.contact-section .section-label {
    display: inline-block;
    background: rgba(214, 154, 59, 0.12);
    color: var(--color-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    margin-bottom: 0.75rem;
}

.contact-section .section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Desktop */
@media (min-width: 992px) {
    .contact-section .section-title {
        font-size: 1.8rem;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
    .contact-section .section-title {
        font-size: 1.5rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) {
    .contact-section .section-title {
        font-size: 1.3rem;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .contact-section .section-title {
        font-size: 1.2rem;
    }
}

.contact-section .section-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .contact-section .section-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contact-section .section-text {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
}

/* ------------------------------------------
   MAIN CONTACT SECTION
------------------------------------------ */
.contact-section {
    padding: clamp(48px, 6vw, 80px) 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ------------------------------------------
   FORM STYLES (scaled down)
------------------------------------------ */
.quote-form-wrapper {
    background: var(--color-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-elevated);
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.form-header {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.4rem;
}

.form-header p {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
}

.required-mark {
    color: var(--color-primary);
}

/* Form Inputs (scaled down) */
.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid rgba(17, 17, 17, 0.15);
    border-radius: 0.75rem;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    background: var(--color-white);
    color: var(--color-text);
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: #aaa;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(214, 154, 59, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select dropdown styling */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.875rem;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D69A3B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Two column row */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
}

/* Checkbox Container - IMPROVED for mobile */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-container .checkbox-text {
    flex: 1;
}

.checkbox-container a {
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}

/* Mobile - make privacy policy link wrap properly */
@media (max-width: 480px) {
    .checkbox-container {
        gap: 0.5rem;
    }
    
    .checkbox-container .checkbox-text {
        font-size: 0.7rem;
    }
    
    .checkbox-container a {
        white-space: normal;
        display: inline-block;
    }
}

.checkbox-container a:hover {
    text-decoration: underline;
}

/* Submit Button (scaled down) */
.submit-btn {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-black);
    padding: 0.7rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 154, 59, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Note */
.form-note {
    font-size: 0.65rem;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 0.875rem;
}

/* Form Message Alerts */
.form-message {
    margin-bottom: 1.25rem;
}

.alert {
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Honeypot Spam Protection */
.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* ------------------------------------------
   CONTACT INFO STYLES (scaled down)
------------------------------------------ */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Emergency Banner */
.emergency-banner {
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border-left: 4px solid var(--color-primary);
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(214, 154, 59, 0.2);
}

.emergency-banner .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary-light);
    margin-bottom: 0.4rem;
}

.emergency-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.4rem;
}

.emergency-number a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.emergency-number a:hover {
    color: var(--color-primary-light);
}

.emergency-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Contact Cards */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--color-white);
    border-radius: 0.875rem;
    transition: all var(--transition-fast);
    border: 1px solid rgba(17, 17, 17, 0.06);
    box-shadow: var(--shadow-sm);
}

.contact-card:hover {
    background: var(--color-white);
    border-color: rgba(214, 154, 59, 0.3);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(214, 154, 59, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.1rem;
    color: var(--color-primary);
}

.contact-card-content h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--color-black);
}

.contact-card-content p,
.contact-card-content a {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    line-height: 1.5;
}

.contact-card-content a:hover {
    color: var(--color-primary);
}

/* Office Hours */
.office-hours {
    background: var(--color-white);
    border-radius: 0.875rem;
    padding: 1rem;
    border: 1px solid rgba(17, 17, 17, 0.06);
    box-shadow: var(--shadow-sm);
}

.office-hours h4 {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    color: var(--color-black);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.06);
    font-size: 0.75rem;
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-day {
    color: var(--color-text-light);
}

.hours-time {
    color: var(--color-black);
    font-weight: 500;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.875rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.social-link {
    width: 38px;
    height: 38px;
    background: rgba(17, 17, 17, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

/* ------------------------------------------
   MAP SECTION
------------------------------------------ */
.map-section {
    padding: 0 0 clamp(48px, 6vw, 80px) 0;
}

.map-container {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 350px;
    border: none;
}

/* ------------------------------------------
   RESPONSIVE BREAKPOINTS
------------------------------------------ */

/* Tablet portrait */
@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .emergency-number {
        font-size: 1.3rem;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .quote-form-wrapper {
        padding: 1.25rem;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .emergency-number {
        font-size: 1.2rem;
    }
    
    .map-container iframe {
        height: 280px;
    }
    
    .contact-section .section-intro {
        margin-bottom: 2rem;
    }
}

/* Mobile portrait */
@media (max-width: 640px) {
    .quote-form-wrapper {
        padding: 1rem;
    }
    
    .form-header h3 {
        font-size: 1.1rem;
    }
    
    .form-header p {
        font-size: 0.75rem;
    }
    
    .form-label {
        font-size: 0.7rem;
    }
    
    .form-control,
    .form-select,
    .form-textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .submit-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .contact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.6rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon i {
        font-size: 1rem;
    }
    
    .contact-card-content h4 {
        font-size: 0.75rem;
    }
    
    .contact-card-content p,
    .contact-card-content a {
        font-size: 0.7rem;
    }
    
    .emergency-banner {
        padding: 1rem;
    }
    
    .emergency-number {
        font-size: 1.1rem;
    }
    
    .emergency-text {
        font-size: 0.7rem;
    }
    
    .hours-row {
        font-size: 0.7rem;
        padding: 0.35rem 0;
    }
    
    .social-link {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    .map-container iframe {
        height: 240px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .quote-form-wrapper {
        padding: 0.875rem;
    }
    
    .form-header h3 {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-note {
        font-size: 0.6rem;
    }
    
    .office-hours {
        padding: 0.875rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1280px;
    }
}

/* Touch device optimization - remove hover effects */
@media (hover: none) {
    .contact-card:hover {
        transform: none;
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .submit-btn:hover {
        transform: none;
    }
}

/* ==========================================
   FORM ERROR MESSAGES - CONTACT PAGE
========================================== */
.form-error {
    font-size: 0.7rem;
    color: #d92d20;
    margin-top: 0.3rem;
    padding-left: 0.25rem;
}

@media (max-width: 640px) {
    .form-error {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .form-error {
        font-size: 0.6rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .social-link,
    .submit-btn,
    .reveal-item {
        transition: none;
    }
    
    .contact-card:hover {
        transform: none;
    }
    
    .reveal-item {
        opacity: 1;
        transform: none;
    }
}