/* === SERVICES ACCORDION (HOMEPAGE) === */
/* Replaces old Pole structure as services.html now uses projects.css */

.services-section {
    background-color: var(--bg-white);
    padding: 10rem var(--padding-page);
    position: relative;
    z-index: 5;
    color: var(--text-dark);
}

.services-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.services-header {
    margin-bottom: 6rem;
    text-align: center;
}

.services-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: -2px;
    color: var(--text-dark);
    line-height: 1.1;
    margin-top: 1rem;
}

/* Accordion Structure */
.accordion-list {
    display: flex;
    flex-direction: column;
}

.accordion-item {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-item:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-header {
    padding: 2.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: var(--color-gray-50);
    /* Slight highlight */
}

.acc-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -2px;
    color: #888;
    margin-right: 2rem;
    width: auto;
    opacity: 0.5;
}

.acc-title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.acc-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.acc-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: opacity 0.3s;
}

.accordion-item:hover .acc-title {
    opacity: 0.7;
}

/* Icon (Plus / Minus) */
.acc-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.acc-icon::before,
.acc-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--text-dark);
    transition: transform 0.3s;
}

.acc-icon::before {
    width: 100%;
    height: 2px;
}

.acc-icon::after {
    width: 2px;
    height: 100%;
}

.accordion-item.active .acc-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Accordion Body */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.acc-content {
    padding-bottom: 3rem;
    padding-top: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.acc-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.acc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acc-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.acc-stat {
    margin-bottom: 2rem;
}

.big-stat {
    font-size: 5rem;
    font-family: inter;
    letter-spacing: -0.5rem;
    font-weight: 300;
    color: var(--text-dark);
    display: block;
    line-height: 1;
}

.stat-desc {
    font-size: 0.9rem;
    color: #666;
}

.acc-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 2rem;
}

.acc-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding-bottom: 4px;
    width: max-content;
}

/* Responsive */
@media (max-width: 900px) {
    .acc-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .acc-image {
        height: 250px;
    }

    .acc-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .services-header {
        margin-bottom: 4rem;
    }

    .services-title {
        font-size: 2.5rem;
    }

    /* Adjust the new large numbers for mobile */
    .acc-number {
        font-size: 2rem;
        margin-right: 1rem;
    }

    /* Stack accordion header elements if needed, or keep row */
    .accordion-header {
        padding: 1.5rem 0;
    }

    .acc-title {
        font-size: 1.5rem;
    }

    .acc-content {
        gap: 2rem;
    }

    .acc-image {
        height: 200px;
    }

    /* Adjust big stat inside accordion */
    .big-stat {
        font-size: 3.5rem;
    }
}

/* === SERVICE CARD IMAGE ADAPTATION === */
/* Override projects.css specific for services page */
.projects-grid .project-image {
    aspect-ratio: 1 / 1;
    /* Square ratio fits most service photos better than vertical */
}

/* === SERVICE MODAL (OVERLAY) === */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    /* Above menu */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.service-modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.service-modal.active .service-modal-content {
    transform: scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.close-modal-btn:hover {
    background: #e0e0e0;
}

.close-modal-btn span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #000;
    transform: rotate(45deg);
}

.close-modal-btn span:nth-child(2) {
    transform: rotate(-45deg);
}

.modal-image-col {
    background: #f0f0f0;
    width: 100%;
    height: 100%;
}

.modal-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text-col {
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.modal-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.1;
    color: #121212;
    letter-spacing: -1px;
    margin-bottom: 2rem;
}

.modal-divider {
    width: 50px;
    height: 2px;
    background: #000;
    margin-bottom: 2rem;
}

.modal-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 3rem;
    max-width: 500px;
}

.modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: #000;
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-radius: 50px;
    width: max-content;
    transition: transform 0.3s;
}

.modal-cta:hover {
    transform: translateY(-3px);
}

/* Modal Responsive */
@media (max-width: 900px) {
    .service-modal-content {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 60vh;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-image-col {
        height: 300px;
        order: 1;
        /* Image first */
    }

    .modal-text-col {
        padding: 3rem 2rem;
        order: 2;
    }

    .modal-title {
        font-size: 2rem;
    }
}