/* ==========================================================
   CONTACT SECTION — AURELCO
   Layout: heading → banner → 4-col row → 3-col left-aligned row
   Fully responsive: 320px → 1600px+
   ========================================================== */



#contact {
    background: #ffffff;
    align-items: flex-start;
    padding: 4rem 1rem;
    padding-bottom: 8rem;
    min-height: unset;
    font-family: 'Inter', sans-serif;
}

.contact-container {
    max-width: 1400px;
    width: 100%;
    padding: 3rem 2rem 0;
    margin: 0 auto;
}

/* ── Header ── */
.contact-header {
    margin-bottom: 3.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.contact-header.reveal { opacity: 1; transform: translateY(0); }
.contact-header h2 {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-align: center;
}

.contact-header span {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #1A1A1A;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

/* ── Schedule Banner ── */
.schedule-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #f1f8e9;
    border-left: 4px solid #2e7d32;
    border-radius: 0 8px 8px 0;
    padding: 0.7rem 1.2rem;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    color: #333;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}
.schedule-banner.reveal { opacity: 1; transform: translateY(0); }
.schedule-banner i      { color: #2e7d32; font-size: 0.95rem; flex-shrink: 0; }
.schedule-banner strong { color: #1b5e20; }

/* ==========================================================
   GRIDS
   ========================================================== */
.offices-grid {
    display: grid;
    border-top: 2px solid #e0e0e0;
}

/* Row 1: 4 columns */
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Row 2: 3 columns, left-aligned (no centering) */
.grid-3 {
    grid-template-columns: repeat(4, 1fr);
    border-top: none;
}

/* ==========================================================
   OFFICE BLOCK
   ========================================================== */
.office-block {
    padding: 1.75rem 1.5rem 1.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.office-block.reveal { opacity: 1; transform: translateY(0); }

/* No right border on last column */
.grid-4 .office-block:nth-child(4n)   { border-right: none; }
.grid-3 .office-block:nth-child(3)    { border-right: none; }

/* Bottom border — row 1 (grid-4) has none on last row, grid-3 keeps it for the closing line */
.grid-4 .office-block:nth-last-child(-n+4) { border-bottom: none; }
.grid-3 .office-block                      { border-bottom: 1px solid #e0e0e0; }

/* Padding: no left pad on first col, add left pad on others */
.grid-4 .office-block:nth-child(4n+1) { padding-left: 0; }
.grid-4 .office-block:not(:nth-child(4n+1)) { padding-left: 1.5rem; }

.grid-3 .office-block:nth-child(1) { padding-left: 0; }
.grid-3 .office-block:nth-child(n+2) { padding-left: 1.5rem; }

/* Main office */
.main-block .office-name { color: #1b5e20; }

.office-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 0.4rem;
    line-height: 1.3;
    text-align: left;
}

.office-address-line {
    font-size: 0.9rem;
    color: #333;
    margin: 0 0 0.15rem;
    line-height: 1.5;
    text-align: left;
}

.map-link {
    display: flex;             /* Changed from inline-flex to flex */
    align-items: center;
    justify-content: flex-start; /* Forces content to the left */
    gap: 0.35rem;
    color: #1565c0;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0.55rem 0 0.65rem;
    transition: color 0.2s ease;
    text-align: left;
    width: fit-content;        /* Ensures it only takes as much space as needed */
}
.map-link i     { font-size: 0.8rem; flex-shrink: 0; }
.map-link:hover { color: #0d47a1; text-decoration: underline; }

.office-phone-line {
    font-size: 0.9rem;
    color: #333;
    margin: 0.1rem 0 0;
    line-height: 1.6;
    text-align: left;
}
.office-phone-line a       { color: #333; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.office-phone-line a:hover { color: #1b5e20; text-decoration: underline; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Large Desktop 1400px+ */
@media (min-width: 1400px) {
    .contact-container { max-width: 1400px; padding: 3rem 3rem 0; }
    .contact-header h2 { font-size: 0.85rem; }
    .office-name       { font-size: 1.05rem; }
    .office-address-line, .office-phone-line, .map-link { font-size: 0.95rem; }
}

/* Laptop 1024–1199px */
@media (max-width: 1199px) and (min-width: 1024px) {
    .contact-container { padding: 2.5rem 1.5rem 0; }
    .contact-header h2 { font-size: 0.85rem; }
    .office-block      { padding: 1.5rem 1.25rem 1.5rem 0; }
    .grid-4 .office-block:nth-child(4n+1),
    .grid-3 .office-block:nth-child(3n+1) { padding-left: 0; }
    .grid-4 .office-block:not(:nth-child(4n+1)),
    .grid-3 .office-block:not(:nth-child(3n+1)) { padding-left: 1.25rem; }
}

/* Large Tablet 900–1023px → both rows become 2-col */
@media (max-width: 1023px) and (min-width: 900px) {
    .contact-container { padding: 2.5rem 1.5rem 0; }
    .contact-header h2 { font-size: 0.85rem; }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 .office-block:nth-child(4n)            { border-right: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-last-child(-n+4)     { border-bottom: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-child(2n)            { border-right: none; }
    .grid-4 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    .grid-4 .office-block:nth-child(4n+1)          { padding-left: 0; }
    .grid-4 .office-block:not(:nth-child(4n+1))    { padding-left: 1.25rem; }
    .grid-4 .office-block:nth-child(2n+1)          { padding-left: 0; }
    .grid-4 .office-block:nth-child(2n)            { padding-left: 1.25rem; }

    .grid-3 { grid-template-columns: repeat(2, 1fr); border-top: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(3n)            { border-right: 1px solid #e0e0e0; }
    .grid-3 .office-block                          { border-bottom: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(2n)            { border-right: none; }
    .grid-3 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    /* lone 3rd item — left-aligned, just takes col 1 */
    .grid-3 .office-block:nth-child(3):last-child  { border-bottom: none; border-right: none; }
    .grid-3 .office-block:nth-child(3n+1)          { padding-left: 0; }
    .grid-3 .office-block:nth-child(2n)            { padding-left: 1.25rem; }

    .office-block { padding: 1.5rem 1.25rem 1.5rem 0; }
}

/* Tablet Portrait 768–899px */
@media (max-width: 899px) and (min-width: 768px) {
    #contact           { padding-top: 90px; }
    .contact-container { padding: 2.25rem 1.5rem 0; }
    .contact-header h2 { font-size: 2.2rem; }
    .schedule-banner   { font-size: 0.85rem; flex-wrap: wrap; }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 .office-block:nth-child(4n)            { border-right: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-last-child(-n+4)     { border-bottom: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-child(2n)            { border-right: none; }
    .grid-4 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    .grid-4 .office-block:nth-child(2n+1)          { padding-left: 0; }
    .grid-4 .office-block:nth-child(2n)            { padding-left: 1.1rem; }

    .grid-3 { grid-template-columns: repeat(2, 1fr); border-top: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(3n)            { border-right: 1px solid #e0e0e0; }
    .grid-3 .office-block                          { border-bottom: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(2n)            { border-right: none; }
    .grid-3 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    .grid-3 .office-block:nth-child(3):last-child  { border-bottom: none; border-right: none; }
    .grid-3 .office-block:nth-child(2n+1)          { padding-left: 0; }
    .grid-3 .office-block:nth-child(2n)            { padding-left: 1.1rem; }

    .office-block { padding: 1.4rem 1.1rem 1.4rem 0; }
}

/* Mobile Landscape 600–767px */
@media (max-width: 767px) and (min-width: 600px) {
    #contact           { padding-top: 85px; }
    .contact-container { padding: 2rem 1.25rem 0; }
    .contact-header h2 { font-size: 2rem; }
    .schedule-banner   { font-size: 0.83rem; flex-wrap: wrap; gap: 0.5rem; }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 .office-block:nth-child(4n)            { border-right: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-last-child(-n+4)     { border-bottom: 1px solid #e0e0e0; }
    .grid-4 .office-block:nth-child(2n)            { border-right: none; }
    .grid-4 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    .grid-4 .office-block:nth-child(2n+1)          { padding-left: 0; }
    .grid-4 .office-block:nth-child(2n)            { padding-left: 1rem; }

    .grid-3 { grid-template-columns: repeat(2, 1fr); border-top: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(3n)            { border-right: 1px solid #e0e0e0; }
    .grid-3 .office-block                          { border-bottom: 1px solid #e0e0e0; }
    .grid-3 .office-block:nth-child(2n)            { border-right: none; }
    .grid-3 .office-block:nth-last-child(-n+2)     { border-bottom: none; }
    .grid-3 .office-block:nth-child(3):last-child  { border-bottom: none; border-right: none; }
    .grid-3 .office-block:nth-child(2n+1)          { padding-left: 0; }
    .grid-3 .office-block:nth-child(2n)            { padding-left: 1rem; }

    .office-block      { padding: 1.25rem 1rem 1.25rem 0; }
    .office-name       { font-size: 0.92rem; }
    .office-address-line, .office-phone-line { font-size: 0.85rem; }
    .map-link          { font-size: 0.83rem; }
}

/* Mobile Portrait 480–599px → 1 column */
@media (max-width: 599px) and (min-width: 480px) {
    #contact           { padding-top: 80px; padding-bottom: 2.5rem; }
    .contact-container { padding: 1.75rem 1.1rem 0; }
    .contact-header h2 { font-size: 1.85rem; }
    .schedule-banner   { font-size: 0.8rem; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.65rem 1rem; }

    .grid-4, .grid-3   { grid-template-columns: 1fr; }

    /* ✅ FIX: reset ALL padding-left overrides to 0 on single column */
    .grid-4 .office-block,
    .grid-3 .office-block,
    .grid-4 .office-block:nth-child(4n),
    .grid-4 .office-block:nth-child(4n+1),
    .grid-4 .office-block:not(:nth-child(4n+1)),
    .grid-3 .office-block:nth-child(3n),
    .grid-3 .office-block:nth-child(2n),
    .grid-3 .office-block:nth-child(n+2) {
        padding: 1.2rem 0;
        padding-left: 0 !important;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .grid-4 .office-block:nth-last-child(-n+4),
    .grid-4 .office-block:nth-last-child(-n+2),
    .grid-3 .office-block:nth-last-child(-n+2) { border-bottom: 1px solid #e0e0e0; }
    .offices-grid .office-block:last-child      { border-bottom: none; }
    .grid-3 { border-top: 1px solid #e0e0e0; }

    .office-name       { font-size: 0.92rem; }
    .office-address-line, .office-phone-line { font-size: 0.85rem; }
    .map-link          { font-size: 0.83rem; }
}

/* Small Mobile 320–479px */
@media (max-width: 479px) {
    #contact           { padding-top: 75px; padding-bottom: 2rem; }
    .contact-container { padding: 1.5rem 1rem 0; }
    .contact-header    { margin-bottom: 1rem; }
    .contact-header h2 { font-size: 0.85rem; }
    .schedule-banner   { font-size: 0.78rem; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.6rem 0.9rem; margin-bottom: 1.75rem; }

    .grid-4, .grid-3   { grid-template-columns: 1fr; }

    /* ✅ FIX: same full reset for all nth-child padding rules */
    .grid-4 .office-block,
    .grid-3 .office-block,
    .grid-4 .office-block:nth-child(4n),
    .grid-4 .office-block:nth-child(4n+1),
    .grid-4 .office-block:not(:nth-child(4n+1)),
    .grid-3 .office-block:nth-child(3n),
    .grid-3 .office-block:nth-child(2n),
    .grid-3 .office-block:nth-child(n+2) {
        padding: 1.1rem 0;
        padding-left: 0 !important;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }

    .grid-4 .office-block:nth-last-child(-n+4),
    .grid-4 .office-block:nth-last-child(-n+2),
    .grid-3 .office-block:nth-last-child(-n+2) { border-bottom: 1px solid #e8e8e8; }
    .offices-grid .office-block:last-child      { border-bottom: none; }
    .grid-3 { border-top: 1px solid #e8e8e8; }

    .office-name       { font-size: 0.9rem; }
    .office-address-line, .office-phone-line { font-size: 0.83rem; }
    .map-link          { font-size: 0.82rem; margin: 0.4rem 0 0.5rem; }
}

/* Extra Small below 320px */
@media (max-width: 319px) {
    .contact-container { padding: 1.25rem 0.75rem 0; }
    .contact-header h2 { font-size: 1.45rem; }
    .schedule-banner   { font-size: 0.74rem; }
    .office-name       { font-size: 0.85rem; }
    .office-address-line, .office-phone-line, .map-link { font-size: 0.78rem; }
}