/**
 * Port Accordion Widget Styles
 * Uses Interactive Map CSS for map section, only accordion-specific styles here
 */

/* Main Container */
.rsgt-port-accordion-container {
    width: 100%;
    background-color: var(--bg-color, #1a2332);
    color: var(--text-color, #ffffff);
}

/* Map section uses .rsgt-saudi-map-container from interactive-map.css */

/* Center the map - override grid layout */
.rsgt-port-accordion-container .rsgt-saudi-map-container {
    display: block;
    width: 100%;
}

.rsgt-port-accordion-container .rsgt-saudi-map-container .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    grid-template-columns: none;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    gap: 0;
}

.rsgt-port-accordion-container .rsgt-saudi-map-container .map-section {
    width: 100%;
    max-width: 778px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1;
}

.rsgt-port-accordion-container .rsgt-saudi-map-container .map-wrapper {
    width: 100%;
    max-width: 778px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rsgt-port-accordion-container .rsgt-saudi-map-container .map-wrapper svg {
    margin: 0 auto !important;
    display: block;
    max-width: 100%;
}

/* Ensure text alignment is centered for any text elements */
.rsgt-port-accordion-container .rsgt-saudi-map-container {
    text-align: center;
}

.rsgt-port-accordion-container .rsgt-saudi-map-container .map-section,
.rsgt-port-accordion-container .rsgt-saudi-map-container .map-wrapper {
    text-align: center;
}

/* Accordion Section - positioned below map (separate row) */
.rsgt-port-accordion-container .rsgt-port-accordion-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background-color: var(--accordion-bg, #1a2332);
}

.rsgt-port-accordion-group {
    display: none;
}

.rsgt-port-accordion-group.active {
    display: block;
}

/* Accordion Items */
.rsgt-accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.rsgt-accordion-item:last-child {
    border-bottom: none;
}

.rsgt-accordion-item:last-child .rsgt-accordion-content-inner {
    padding-bottom: 0;
}

.rsgt-accordion-header {
    display: flex;
    align-items: self-start;
    gap: 10px;
    padding: 48px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    pointer-events: auto;
    z-index: 1;
}

.rsgt-accordion-icon {
    font-size: 18px;
    color: var(--text-color, #ffffff);
    width: 42px;
    text-align: center;
    flex-shrink: 0;
    line-height: 0;
}

.rsgt-accordion-icon svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

.rsgt-accordion-title {
    flex: 1;
    color: #8DD8F4;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: -0.32px;
}

.rsgt-accordion-toggle {
    margin-left: auto;
    color: var(--text-color, #ffffff);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    line-height: 0;
}

.rsgt-accordion-toggle svg {
    width: 34px;
    height: auto;
}

.rsgt-accordion-item.active .rsgt-accordion-header {
    padding-bottom: 24px;
}

.rsgt-accordion-item.active .rsgt-accordion-toggle {
    transform: rotate(180deg);
    opacity: 1;
}

/* Accordion Content */
.rsgt-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rsgt-accordion-item.active .rsgt-accordion-content {
    max-height: 2000px;
}

.rsgt-accordion-content-inner {
    padding: 0 0 48px 0;
    color: var(--text-color, #E5E7EB);
    text-align: justify;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    text-transform: capitalize;
    animation: fadeInContent 0.4s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 0.85;
        transform: translateY(0);
    }
}

/* Highlights Grid Layout (Container Terminal Highlights & MPT Capabilities) */
.rsgt-highlights-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 0;
    width: 100%;
    margin: 0 -12px;
    row-gap: 24px;
}

.rsgt-highlight-column {
    display: flex;
    flex-direction: column;
    padding: 12px;

}

.rsgt-highlight-column:last-child {
    border-right: none;
}

.rsgt-highlight-label {
    color: #91DCD5;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: left;
}

.rsgt-highlight-value {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

/* Responsive adjustments for highlights grid */

/* Smooth Entrance Animation */
.rsgt-port-accordion-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Focus Styles for Accessibility */
.rsgt-accordion-header:focus {
    outline: 2px solid rgba(145, 220, 213, 0.5);
    outline-offset: -2px;
}

.rsgt-port-marker:focus .rsgt-port-label {
    outline: 2px solid rgba(145, 220, 213, 0.5);
    outline-offset: 2px;
}

@media (max-width: 1023px) {
    .rsgt-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rsgt-accordion-content-inner {
        font-size: 18px;
    }

    .rsgt-accordion-title {
        font-size: 24px;
    }

    .rsgt-accordion-icon {
        width: 30px;
    }

    .rsgt-accordion-icon svg {
        width: 24px;
        height: 24px;
    }

    .rsgt-highlight-label {
        font-size: 24px;
    }

}

@media (max-width: 767px) {
    .rsgt-highlights-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}