/* ============================================
   AIA Consultores y Constructores
   Contacto Page – Architecture Style v3.0
   Paleta: Azul #030083 | Naranja #fe7f00 | Gris #d9d9d9 | Celeste #51d1f6
   ============================================ */

:root {
    /* Brand Colors */
    --c-blue: #030083;
    --c-orange: #fe7f00;
    --c-gray: #d9d9d9;
    --c-cyan: #51d1f6;
    --c-white: #ffffff;
    --c-dark: #1a1a1a;

    /* Contact-specific tokens */
    --contact-accent: var(--c-orange);
    --contact-bg: #ffffff;
    --contact-text: #333;
    --contact-muted: #888;
    --contact-form-bg: #1c1c1c;

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 8px 30px rgba(3, 0, 131, 0.08);
    --shadow-form: 0 20px 60px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: all 0.4s var(--ease-smooth);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== MAIN WRAPPER ===== */
.contact-page {
    background-color: var(--contact-bg);
    min-height: 100vh;
    overflow-x: hidden;
    
    color: var(--contact-text);
}

/* ====================================================
   HERO SECTION — 3-Column Architecture Layout
   ==================================================== */
.arch-hero {
    display: grid;
    grid-template-columns: 260px 1fr 380px;
    align-items: center;
    min-height: 85vh;
    padding: 100px 48px 60px;
    gap: 32px;
    position: relative;
    background: var(--c-white);
    overflow: hidden;
}

/* Subtle grid pattern background */
.arch-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(3, 0, 131, 0.02) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ===== LEFT COLUMN: Services ===== */
.arch-services {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 2;
}

.arch-service-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    animation: slideInLeft 0.6s var(--ease-smooth) forwards;
}

.arch-service-card[data-delay="0"] { animation-delay: 0.2s; }
.arch-service-card[data-delay="1"] { animation-delay: 0.4s; }
.arch-service-card[data-delay="2"] { animation-delay: 0.6s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.arch-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(254, 127, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--c-orange);
    transition: var(--transition);
}

.arch-service-card:hover .arch-service-icon {
    background: var(--c-orange);
    color: var(--c-white);
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(254, 127, 0, 0.25);
}

.arch-service-info h3 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--c-blue);
    letter-spacing: 1px;
    margin: 0;
    transition: color 0.3s ease;
}

.arch-service-card:hover .arch-service-info h3 {
    color: var(--c-orange);
}

.arch-service-info p {
    font-size: 0.82rem;
    color: var(--contact-muted);
    line-height: 1.5;
    margin: 0;
}

/* ===== CENTER: Architectural Sketch ===== */
.arch-sketch-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    cursor: default;
}

.arch-sketch-img {
    width: 100%;
    max-width: 620px;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.15s ease-out;
    will-change: transform;
    filter: contrast(0.9) brightness(1.02);
}

/* When hovering, JS controls movement. This is the "resting" state transition */
.arch-sketch-img.idle {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== RIGHT COLUMN: CTA + Form ===== */
.arch-right-col {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: slideInRight 0.7s var(--ease-smooth) 0.3s forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* CTA Header */
.arch-cta {
    text-align: left;
}

.arch-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--c-blue);
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
}

.arch-title .highlight {
    color: var(--c-orange);
}

.arch-subtitle {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-orange);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Form Card (Dark Theme) */
.arch-form-card {
    background: var(--contact-form-bg);
    border-radius: 20px;
    padding: 36px 30px;
    box-shadow: var(--shadow-form);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent line */
.arch-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-orange), var(--c-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.arch-form-card:hover::before {
    opacity: 1;
}

.arch-form-group {
    margin-bottom: 20px;
}

.arch-input {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    
    font-size: 0.92rem;
    color: var(--c-white);
    transition: border-color 0.3s ease;
    outline: none;
}

.arch-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.arch-input:focus {
    border-bottom-color: var(--c-orange);
}

/* Select styling on dark bg */
select.arch-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fe7f00'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 16px;
}

select.arch-input option {
    background: #2a2a2a;
    color: #fff;
    padding-left: 10px;
}

/* Submit Button */
.arch-btn-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px 28px;
    background: var(--c-orange);
    color: var(--c-white);
    border: none;
    border-radius: 8px;
    
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(254, 127, 0, 0.3);
}

.arch-btn-submit:hover {
    background: #e67300;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(254, 127, 0, 0.4);
}

.arch-btn-submit:active {
    transform: translateY(0);
}

.arch-btn-submit i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.arch-btn-submit:hover i {
    transform: translateX(5px);
}

/* ====================================================
   CONTACT DETAILS SECTION (Info Cards + Map)
   ==================================================== */
.contact-details-section {
    background: #f5f7fb;
    padding: 80px 48px;
}

.contact-details-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

/* Info Sidebar */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    perspective: 1000px;
}

.contact-info-card {
    background: var(--c-white);
    padding: 18px 22px;
    border-radius: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(3, 0, 131, 0.06);
    box-shadow: var(--shadow-soft);
    transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
}

.contact-info-card:hover {
    border-color: var(--c-blue);
    box-shadow: 0 16px 40px rgba(3, 0, 131, 0.1);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.4s var(--ease-spring);
    transform: translateZ(20px);
}

.contact-info-card:hover .icon-box {
    transform: translateZ(35px) scale(1.08);
}

/* Icon colors per card */
.contact-info-card:nth-child(1) .icon-box { background: rgba(3, 0, 131, 0.08); color: var(--c-blue); }
.contact-info-card:nth-child(2) .icon-box { background: rgba(254, 127, 0, 0.08); color: var(--c-orange); }
.contact-info-card:nth-child(3) .icon-box { background: rgba(81, 209, 246, 0.08); color: var(--c-cyan); }
.contact-info-card:nth-child(4) .icon-box { background: rgba(3, 0, 131, 0.06); color: var(--c-blue); }

.info-content h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--c-blue);
    transform: translateZ(10px);
}

.info-content p,
.info-content a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.5;
    display: block;
    margin: 0;
    transform: translateZ(5px);
    transition: color 0.3s ease;
}

.info-content a:hover {
    color: var(--c-orange);
}

.whatsapp-link {
    color: #25d366 !important;
    font-weight: 700 !important;
    margin-top: 4px !important;
}

.whatsapp-link:hover {
    color: #128c7e !important;
}

/* Map */
.map-container {
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
    min-height: 420px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(3, 0, 131, 0.06);
    filter: grayscale(0.15);
    transition: filter 0.4s ease;
}

.map-container:hover {
    filter: grayscale(0);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 420px;
    display: block;
}

/* ====================================================
   DYNAMIC PANEL SYSTEM
   ==================================================== */

/* Card base — includes reveal start state */
.contact-info-card {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease var(--reveal-delay, 0s),
                transform 0.5s ease var(--reveal-delay, 0s),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease;
}

.contact-info-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.contact-info-card.active {
    border-color: var(--c-blue) !important;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    box-shadow: 0 10px 32px rgba(3, 0, 131, 0.13) !important;
}

/* Chevron arrow inside card */
.card-arrow {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ccc;
    flex-shrink: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* don't steal card click */
}

.contact-info-card.active .card-arrow {
    background: var(--c-blue);
    color: #fff;
    transform: scale(1.1);
}

.contact-info-card:hover .card-arrow {
    color: var(--c-blue);
}


/* Dynamic panel wrapper */
.dynamic-panel-wrapper {
    position: relative;
    min-height: 420px;
    border-radius: 24px;
    overflow: hidden;
}

/* Each panel */
.dynamic-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.985);
    transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dynamic-panel.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
    transform: translateY(0) scale(1);
}

/* Info Panel Cards (non-map panels) */
.info-panel-card {
    background: var(--c-white);
    border-radius: 24px;
    padding: 48px 44px;
    height: 100%;
    min-height: 420px;
    border: 1px solid rgba(3, 0, 131, 0.06);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.info-panel-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
}

.info-panel-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--c-blue);
    margin: 0;
    letter-spacing: -0.5px;
}

.info-panel-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Action buttons inside panels */
.info-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.panel-action-btn {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 22px;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    
    transition: all 0.3s var(--ease-spring);
    text-align: left;
    width: 100%;
}

.panel-action-btn i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.panel-action-btn span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panel-action-btn small {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.65;
}

.panel-action-btn strong {
    font-size: 0.97rem;
    font-weight: 800;
}

/* Primary button */
.panel-action-btn.primary {
    background: rgba(3, 0, 131, 0.06);
    color: var(--c-blue);
}

.panel-action-btn.primary:hover {
    background: var(--c-blue);
    color: #fff;
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(3, 0, 131, 0.2);
}

/* WhatsApp button */
.panel-action-btn.whatsapp {
    background: rgba(37, 211, 102, 0.08);
    color: #25d366;
}

.panel-action-btn.whatsapp:hover {
    background: #25d366;
    color: #fff;
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
}

/* Secondary button (copy email) */
.panel-action-btn.secondary {
    background: rgba(81, 209, 246, 0.08);
    color: var(--c-cyan);
}

.panel-action-btn.secondary:hover {
    background: var(--c-cyan);
    color: #fff;
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(81, 209, 246, 0.25);
}

/* Note row at bottom of panel */
.info-panel-note {
    margin-top: auto;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.info-panel-note i {
    color: var(--c-orange);
    font-size: 0.85rem;
}

/* ====================================================
   SCHEDULE GRID (Horario Panel)
   ==================================================== */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 4px;
}

.schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8faff;
    border-radius: 12px;
    border: 1px solid #e8edf8;
    transition: background 0.3s ease;
}

.schedule-row:hover {
    background: #eef2ff;
}

.schedule-row.closed {
    background: #fef9f9;
    border-color: #fdecea;
    opacity: 0.75;
}

.schedule-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.day-range {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--c-blue);
}

.schedule-row.closed .day-range {
    color: #94a3b8;
}

.day-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d9d9d9;
    display: inline-block;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--c-blue);
}

.dot.active.sat {
    background: var(--c-orange);
}

.schedule-time {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
}

.closed-label {
    color: #ef4444;
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1200px) {
    .arch-hero {
        grid-template-columns: 220px 1fr 340px;
        padding: 100px 32px 50px;
        gap: 24px;
    }

    .arch-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 1024px) {
    .arch-hero {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        min-height: auto;
        padding: 100px 32px 48px;
        gap: 32px;
    }

    .arch-services {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 20px;
        order: 1;
    }

    .arch-service-card {
        flex: 1;
    }

    .arch-sketch-wrapper {
        order: 2;
        min-height: 300px;
    }

    .arch-right-col {
        order: 3;
    }

    .contact-details-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .arch-hero {
        grid-template-columns: 1fr;
        padding: 90px 20px 40px;
        gap: 28px;
    }

    .arch-services {
        flex-direction: column;
        gap: 16px;
        order: 2;
    }

    .arch-service-card {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .arch-sketch-wrapper {
        order: 1;
        min-height: 250px;
    }

    .arch-right-col {
        order: 3;
    }

    .arch-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .arch-subtitle {
        text-align: center;
    }

    .arch-cta {
        text-align: center;
    }

    .contact-details-section {
        padding: 50px 20px;
    }

    .info-sidebar {
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .arch-hero {
        padding: 80px 16px 32px;
    }

    .arch-title {
        font-size: 1.5rem;
    }

    .arch-form-card {
        padding: 28px 20px;
    }

    .arch-btn-submit {
        padding: 13px 20px;
    }
}

/* ====================================================
   RESPONSIVE — Dynamic Panels
   ==================================================== */
@media (max-width: 1024px) {
    .dynamic-panel-wrapper {
        min-height: 380px;
    }

    .info-panel-card {
        min-height: 380px;
        padding: 36px 32px;
    }

    .map-container {
        min-height: 380px;
    }

    .map-container iframe {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .contact-details-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dynamic-panel-wrapper {
        min-height: 340px;
    }

    .info-panel-card {
        min-height: 340px;
        padding: 28px 22px;
        gap: 14px;
    }

    .info-panel-title {
        font-size: 1.4rem;
    }

    .map-container,
    .map-container iframe {
        min-height: 300px;
    }

    .schedule-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .panel-action-btn strong {
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .info-panel-card {
        padding: 22px 18px;
    }

    .info-panel-icon {
        width: 54px;
        height: 54px;
        font-size: 1.3rem;
    }

    .panel-action-btn {
        padding: 13px 16px;
        gap: 14px;
    }

    .card-arrow {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
}
