/* Contacts ("Contactos") Section Styles based on Figma Design (node-id: 1:497) */

.contacts-section {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
    padding: 88px 145px; /* Symmetrical desktop padding from Figma */
}

/* Inner Symmetrical Container */
.contacts-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px; /* Gap of 50px between title and map/form */
    box-sizing: border-box;
}

/* Title block (1:498) */
.contacts-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* 15px gaps between divider, subtitle, and title */
    width: 100%;
    text-align: center;
}

/* Divider (1:499) with draw stroke scroll animation */
.contacts-divider-wrapper {
    width: 100%;
    height: 1px;
    position: relative;
    margin-bottom: 5px;
}

.contacts-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, #59bcb1 0%, rgba(65, 137, 129, 0) 50%, #15b4b6 100%);
    border: none;
    margin: 0;
    transform-origin: left;
    transform: scaleX(0); /* Hidden at rest */
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.contacts-divider.in-view {
    transform: scaleX(1); /* Animated to full width on viewport enter */
}

/* Subtitle (1:500) */
.contacts-subtitle {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 26px;
    font-weight: 400; /* Regular */
    color: #4e4e4e; /* Dark grey from Figma */
    margin: 0;
    line-height: 1.2;
    letter-spacing: -1.56px;
}

/* Main Title (1:501) */
.contacts-title {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 67.58px;
    font-weight: 700; /* Bold */
    margin: 0;
    line-height: 1.2;
    letter-spacing: -4.05px;
    background: linear-gradient(135deg, #15B4B6 0%, #094F50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Symmetrical Map and Form layout (1:502) */
.contacts-map-form-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 26px; /* Gap from Figma: 1438 - 706 - 706 = 26px */
    width: 100%;
}

/* Columns Base styling (width: 706px, height: 735px) */
.contacts-map-column,
.contacts-form-column {
    flex: 1;
    min-width: 0; /* Prevents overflow in flex layouts */
    height: 735px; /* Symmetrical height from Figma */
    border-radius: 7px;
    position: relative;
    box-sizing: border-box;
}

/* Map Column (1:503) */
.contacts-map-column {
    background-color: #f0f0f0;
    overflow: hidden;
    border: 1.5px solid #8BCED8; /* Outlined stroke matching requested color */
}

.contacts-map-iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.contacts-map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    /* Customized grayscale aesthetic filter at rest */
    filter: grayscale(100%) contrast(1.15) opacity(0.85);
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.contacts-map-column:hover .contacts-map-iframe {
    /* Reveals color on hover for premium interactive feel */
    filter: grayscale(20%) contrast(1.05) opacity(1);
}

/* Floating overlay container (Frame 223 / 1:504) */
.contacts-map-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px; /* Figma itemSpacing: 13.94px */
    z-index: 10;
}

/* Floating options menu (1:505) */
.contacts-map-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Figma itemSpacing: 20.5px */
    background-color: #82e4e6; /* Symmetrical background fill: rgb(130,228,230) */
    border: 1px solid #368385; /* Stroke color: rgb(54,131,133) */
    border-radius: 8.2px;
    padding: 13px 16px; /* Symmetrical padding from Figma */
    width: 56px;
    box-sizing: border-box;
    
    /* Toggle state transitions */
    opacity: 0;
    transform: translateY(15px) scale(0.9);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
}

/* Visible class when active */
.contacts-map-overlay.active .contacts-map-options {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

/* Icon items inside options panel */
.contacts-option-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 28px;
    position: relative;
    transition: transform 0.2s ease;
}

.contacts-option-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.contacts-option-item:hover {
    transform: scale(1.15);
}

/* Premium Tooltip styling triggered on hover */
.contacts-option-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background-color: #004152; /* Matching footer dark brand color */
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 14px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 65, 82, 0.25);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

/* Tooltip arrow pointer */
.contacts-option-item::before {
    content: "";
    position: absolute;
    left: calc(100% + 7px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 4px 8px 4px 0;
    border-style: solid;
    border-color: transparent #004152 transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

/* Tooltip visibility on hover */
.contacts-option-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.contacts-option-item:hover::before {
    opacity: 1;
}

/* Keep the pin tooltip from line wrapping awkwardly */
.contacts-option-item[data-tooltip*="Polo"]::after,
.contacts-option-item[data-tooltip*="Avenida"]::after {
    white-space: normal;
    width: 250px;
    line-height: 1.3;
}

/* Toggle button (1:509) */
.contacts-map-toggle {
    width: 39.4px;
    height: 39.4px;
    background-color: #82e4e6; /* Symmetrical background fill: rgb(130,228,230) */
    border: 1px solid #368385; /* Stroke color: rgb(54,131,133) */
    border-radius: 50%; /* Circle shape from Figma cornerRadius 39.8px */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

/* Plus sign styling */
.contacts-map-toggle .toggle-icon {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 25.5px;
    font-weight: 400;
    color: #004152; /* Symmetrical fill color: rgb(0,65,82) */
    line-height: 1;
    display: block;
    margin-top: -2px; /* Visual center adjustments */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-map-toggle:hover {
    transform: scale(1.08);
    background-color: #a4eff1;
}

/* Active states (Options panel open) */
.contacts-map-overlay.active .contacts-map-toggle {
    background-color: #004152;
    border-color: #004152;
}

.contacts-map-overlay.active .contacts-map-toggle .toggle-icon {
    color: #ffffff;
    transform: rotate(45deg); /* Transforms + into x */
}

/* Form Column (1:511) */
.contacts-form-column {
    background: linear-gradient(to bottom, #00676f 0%, #59bcb1 100%); /* Symmetrical gradient stops */
    padding: 40px 54px 32px; /* Figma paddings */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Decorative background branding graphic (1:512) */
.contacts-form-bg-graphic {
    position: absolute;
    right: -357px; /* Symmetrical coordinate math relative to form container boundary */
    bottom: -355px;
    width: 702px;
    height: 698px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.15; /* Symmetrical transparency overlay */
    pointer-events: none;
    z-index: 1;
}

/* Foreground Form Content */
.contacts-form-content {
    position: relative;
    z-index: 2; /* Sits above the background graphic */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Form text headers (1:554) */
.contacts-form-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.contacts-form-title {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 35px;
    font-weight: 700; /* Bold */
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -2.1px;
}

.contacts-form-desc {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 400; /* Regular */
    color: #82e4e6; /* Symmetrical light blue text: rgb(130,228,230) */
    margin: 0;
    line-height: 1.25;
    letter-spacing: -1.08px;
}

/* Form element & fields (1:557) */
.contacts-form-element {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.contacts-form-fields-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Symmetrical itemSpacing: 15px */
    width: 100%;
    margin-bottom: 26px; /* Symmetrical gap: 26px below inputs to the button */
}

.contacts-input-group {
    width: 100%;
}

/* Inputs styling */
.contacts-input {
    width: 100%;
    height: 47px; /* Symmetrical input height from Figma */
    background-color: rgba(255, 255, 255, 0.9); /* Symmetrical 0.9 opacity white fill */
    border: none;
    border-radius: 5px; /* Symmetrical cornerRadius: 5px */
    padding: 13px 19px; /* Symmetrical paddings: top/bottom 13px, left/right 19px */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #0c4b4d; /* Dark teal matching theme content color */
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
}

.contacts-input::placeholder {
    color: #59bcb1; /* Symmetrical placeholder teal: rgb(89,188,177) */
    opacity: 1; /* Override browser default opacity */
}

/* Custom Textarea (1:566) */
.contacts-textarea.contacts-input {
    height: 220px; /* Symmetrical height: 220px */
    resize: none; /* Disables standard resize drag handle */
}

/* Focus and active input states */
.contacts-input:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 2.5px rgba(21, 180, 182, 0.6); /* Soft teal outer focus ring */
}

/* Submit Button styling (1:568) */
.contacts-form-submit-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.contacts-submit-btn {
    width: auto;
    min-width: 115px; /* Symmetrical width from Figma */
    height: 56px; /* Symmetrical height from Figma */
    background-color: #ffffff; /* Symmetrical background fill: White */
    border: 1.5px solid #3ba1bf; /* Symmetrical stroke: rgb(59,161,191) */
    border-radius: 65px; /* Figma cornerRadius 65px */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 30px; /* Symmetrical paddings */
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-submit-btn span {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700; /* Bold */
    color: #3ba1bf; /* Text color matching the stroke */
    letter-spacing: 0;
    line-height: 1;
}

.contacts-submit-btn:hover {
    background-color: #3ba1bf;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 161, 191, 0.25);
}

.contacts-submit-btn:hover span {
    color: #ffffff;
}

.contacts-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Inline form feedback */
.contacts-form-feedback {
    margin-top: 15px;
    padding: 12px 18px;
    border-radius: 5px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.contacts-form-feedback.success {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contacts-form-feedback.error {
    background-color: rgba(244, 67, 54, 0.15);
    color: #ffcdd2;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* --- Responsive & Mobile Adaptability --- */

@media (max-width: 1300px) {
    .contacts-section {
        padding: 80px 80px;
    }
}

@media (max-width: 1024px) {
    .contacts-section {
        padding: 70px 40px;
    }
    
    .contacts-map-form-wrapper {
        flex-direction: column; /* Stacks map on top of form */
        gap: 30px;
    }
    
    .contacts-map-column,
    .contacts-form-column {
        width: 100%;
        height: auto;
    }
    
    .contacts-map-column {
        height: 500px; /* Reduced fixed height for stacked map */
    }
    
    .contacts-form-column {
        padding: 40px 40px;
    }
    
    .contacts-form-bg-graphic {
        /* Restructures graphic coordinates for stacked aspect ratio */
        right: -100px;
        bottom: -200px;
        width: 500px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .contacts-section {
        padding: 60px 24px;
    }
    
    .contacts-container {
        gap: 40px;
    }
    
    .contacts-title {
        font-size: 48px;
        letter-spacing: -2px;
    }
    
    .contacts-subtitle {
        font-size: 20px;
        letter-spacing: -1px;
    }
    
    .contacts-map-column {
        height: 400px;
    }
    
    .contacts-form-column {
        padding: 35px 24px;
    }
    
    .contacts-form-title {
        font-size: 28px;
        letter-spacing: -1.5px;
    }
    
    .contacts-form-desc {
        font-size: 16px;
        letter-spacing: -0.8px;
    }
    
    .contacts-input {
        font-size: 16px;
        padding: 11px 16px;
    }
    
    .contacts-textarea.contacts-input {
        height: 180px;
    }
}
