/* Core Modal Styling */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.custom-modal-wrapper.is-open .custom-modal-overlay {
    display: flex;
    opacity: 1;
}

.custom-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background-color: #fff;
    color: #fff;
    border-radius: 12px;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-modal-wrapper.is-open .custom-modal-content {
    transform: translateY(0);
    height: 80vh;
  overflow-y: scroll;
}
.custom-modal-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba( 0, 0, 0, 0.5);
}

/* Banner Header Styling */
.custom-modal-banner {
    position: relative;
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.custom-modal-header-overlay {
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    position: relative;
  z-index: 2;
}

.custom-modal-header-simple {
    padding: 30px;
    background: #222;
}

.custom-modal-title {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
}

.custom-modal-subtitle {
    margin: 5px 0 0;
    font-size: 18px;
    opacity: 0.8;
}

/* Body & Blocks */
.custom-modal-body {
    padding: 30px;
}

.custom-modal-standard {
    margin-bottom: 30px;
    line-height: 1.6;
}

.custom-modal-standard:last-child {
    margin-bottom: 0;
}

.custom-modal-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.custom-modal-grid:last-child {
    margin-bottom: 0;
}

.custom-modal-grid.layout-grid {
    grid-template-columns: repeat(3, 1fr);
}

.custom-modal-section-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #f39c12;
    margin: 0 0 35px;
    font-family: serif;
    letter-spacing: 1px;
}

.custom-modal-blocks-wrapper {
    margin-bottom: 30px;
}

.custom-modal-grid.layout-flex {
    display: flex;

    gap: 20px;
    justify-content: center;
}

.custom-modal-grid-item {
    background: #1a1f2c;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-modal-grid-item:hover {
    transform: translateY(-5px);
    background: #212836;
    border-color: rgba(255,255,255,0.15);
}

.item-icon {
    font-size: 28px;
    color: #f39c12;
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    font-family: serif;
    letter-spacing: 0.5px;
}

.item-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.8;
    color: #d1d5db;
}

/* Controls */
.custom-modal-close {
position: absolute;
  top: 15px;
  right: 20px;
  background: #fff !important;
  background-color: rgba(0, 0, 0, 0);
  border: none;
  color: #000 !important;
  font-size: 37px !important;
  cursor: pointer;
  z-index: 100;
  line-height: 1;
  padding: 0px 9px !important;
}

/* Trigger Button */
.custom-modal-trigger {
    padding: 12px 28px;
    background: #f39c12;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Scroll Lock */
body.modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-modal-grid.layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .custom-modal-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .custom-modal-grid.layout-grid {
        grid-template-columns: 1fr;
    }
}
