/* --------------------------------------------------
   0) GLOBAL / RESET / VARIABLES
--------------------------------------------------- */
:root {
    /* Change this max width as desired */
    --universal-box-max-width: min(500px, 40vw);
}

/* --------------------------------------------------
     1) HERO SECTION (Existing)
  --------------------------------------------------- */
#heading {
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    margin: 0;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#home-title {
    font-family: "Raleway", sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    margin: 0 0 2vh;
}

#home-subtitle {
    font-family: "Raleway", sans-serif;
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
    color: rgb(220, 220, 220);
}

/* --------------------------------------------------
     2) WHAT WE OFFER SECTION (Existing)
     (Does NOT use universal-box max-width)
  --------------------------------------------------- */
#what-we-offer {
    margin-top: 10vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    padding-bottom: 4rem;
}

.offer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.section-title {
    font-family: "Roboto", sans-serif;
    font-size: 5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: #46b5d1;
    text-transform: uppercase;
    text-align: left;
    white-space: pre-line;
    margin: 0;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(20px);
}

.offer-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(50px);
}

/* Offer box styling (excluded from max-width) */
.offer-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(20px);
    background:
        radial-gradient(circle at 100% 0%, rgba(86, 22, 150, 0.25), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(17, 89, 162, 0.25), transparent 70%);
    overflow: hidden;
}

.offer-box:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.offer-box .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    position: relative;
    z-index: 1;
}

.offer-box h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.offer-box p {
    margin: 0;
    line-height: 1.5;
    font-size: 1.1rem;
    color: rgb(220, 220, 220);
}

/* --------------------------------------------------
     3) UNIVERSAL SECTIONS
  --------------------------------------------------- */
.universal-section {
    margin-top: 10vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    padding-bottom: 4rem;
}

.universal-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(300px, 2fr);
    gap: 2rem;
    align-items: center;
}

.universal-title {
    font-family: "Roboto", sans-serif;
    font-size: 4rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: #46b5d1;
    text-transform: uppercase;
    text-align: left;
    white-space: pre-line;
    margin: 0;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(20px);
}

.universal-grid {
    position: relative;
    display: grid;
    /* Single column by default, but items are right-aligned: */
    grid-template-columns: 1fr;
    gap: 2rem;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(50px);
    justify-items: end;
    /* pushes universal-box to the right */
}

/* universal-box has a max-width from the variable */
.universal-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s;
    opacity: 0;
    /* fade-in/out via JS */
    transform: translateY(20px);
    overflow: hidden;
    max-width: var(--universal-box-max-width);
    /* apply the global var */
    width: 100%;
    min-width: min(300px, 90vw);
    height: fit-content;
    margin: 0;
}

.universal-box:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.universal-box .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 6px rgba(70, 181, 209, 0.7);
}

.universal-box h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.universal-box p {
    margin: 0;
    line-height: 1.5;
    font-size: 1.1rem;
    color: rgb(220, 220, 220);
}

/* Corner glows */
.glow-blue {
    background:
        radial-gradient(circle at 100% 0%, rgba(17, 89, 162, 0.25), transparent 40%),
        rgba(255, 255, 255, 0.05);
}

.glow-green {
    background:
        radial-gradient(circle at 100% 0%, rgba(53, 226, 108, 0.25), transparent 40%),
        rgba(255, 255, 255, 0.05);
}

.glow-red {
    background:
        radial-gradient(circle at 100% 0%, rgba(231, 91, 94, 0.25), transparent 40%),
        rgba(255, 255, 255, 0.05);
}

.glow-gold {
    background:
        radial-gradient(circle at 100% 0%, rgba(219, 178, 70, 0.25), transparent 40%),
        rgba(255, 255, 255, 0.05);
}

.glow-purple {
    background:
        radial-gradient(circle at 100% 0%, rgba(86, 22, 150, 0.25), transparent 40%),
        rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------
     4) TESTIMONIALS CAROUSEL
  --------------------------------------------------- */
.testimonial-box {
    text-align: center;
    width: var(--universal-box-max-width);
    min-width: min(300px, 90vw);
}

.testimonials-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; /* new: space out buttons properly */
    min-height: 120px;
    padding: 0 1rem; /* new */
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 70%;
    text-align: center;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(20px);
}

.carousel-item.active {
    opacity: 1;
    position: relative;
    transform: translateY(0);
}

/* Carousel arrows */
.carousel-prev,
.carousel-next {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: background 0.3s ease;
    border-radius: 50%;
    z-index: 3;
    position: static; /* changed from absolute */
    margin: 0 1rem;   /* new */
    transform: none;  /* reset transformation */
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Stars styling */
.stars {
    margin-top: 0.5rem;
}

.stars .fa-star {
    color: gold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* --------------------------------------------------
     5) FAQ ACCORDION (with rotating arrow)
  --------------------------------------------------- */
.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 5px;
    transition: background 0.3s;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: "▼";
    position: static;
    margin-left: auto;
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    transform: rotate(180deg);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.2);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.5rem;
    padding: 0 0.8rem;
}

.faq-answer p {
    margin: 0.8rem 0;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    /* expanded */
}

/* --------------------------------------------------
     6) SCROLL ANIMATIONS & MEDIA QUERIES
  --------------------------------------------------- */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

@media screen and (max-width: 950px) {
    #home-title {
        font-size: clamp(2rem, 10vw, 5rem);
    }

    #home-subtitle {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }

    .universal-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .offer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .offer-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        text-align: center;
    }

    .universal-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .universal-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        /* center on mobile if you prefer */
    }

    .universal-title {
        text-align: center;
    }

    .universal-box {
        max-width: 100%;
    }

    .testimonial-box {
        width: 80vw !important;
    }
    
}

/* Update media queries to handle tablet breakpoints better */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    :root {
        --universal-box-max-width: min(400px, 50vw);
    }

    .universal-container {
        grid-template-columns: 1fr 1.5fr;
        gap: 1.5rem;
    }

    .universal-title {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }

    .testimonial-box {
        width: var(--universal-box-max-width) !important;
    }
}

/* Only switch to mobile layout on smaller screens */
@media screen and (max-width: 767px) {
    .universal-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .universal-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .universal-title {
        text-align: center;
    }

    .universal-box,
    .testimonial-box {
        max-width: min(500px, 90vw);
        width: 100%;
    }
}

/* --------------------------------------------------
     7) SCROLL INDICATOR
  --------------------------------------------------- */
.scroll-indicator {
    position: fixed;
    bottom: 6vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    animation: bounce 1.5s infinite;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(50px);
}

.scroll-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-text {
    font-size: 1rem;
    color: #ccc;
}

.scroll-arrow {
    font-size: 2rem;
    color: #ccc;
    margin-top: 5px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}