/* ===================================
   SERVICE PAGE STYLES
   Based on Figma Design Specifications
   =================================== */

/* Scroll Animations */
[data-aos="fade-in"] {
    opacity: 0;
    transition-property: opacity;
}

[data-aos="fade-in"].aos-animate {
    opacity: 1;
}

[data-aos="fade-down"] {
    opacity: 0;
    transform: translateY(-100px);
    transition-property: opacity, transform;
}

[data-aos="fade-down"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotateOnce {
    from {
        transform: rotate(-60deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.image-animate-on-scroll {
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.image-animate-on-scroll.visible {
    opacity: 1;
    animation: rotateOnce 0.5s ease-in-out;
}

/* Page Section */
.service-section {
    position: relative;
    width: 100%;
    min-height: 832px;
    background: #F0EFE7;
    /* beige */
    padding: 100px 20px 60px;
    overflow: hidden;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
}

/* ===================================
   LEFT SIDE - TEXT CONTENT
   =================================== */

.text-content {
    position: relative;
    width: 45%;
    max-width: 555px;
    padding-top: 32px;
    /* Adjust to match 132px from container top */
    z-index: 10;
    flex-shrink: 0;
}

.page-title {
    font-family: 'Libre Baskerville', serif;
    font-style: normal;
    font-weight: 700;
    font-size: 90px;
    line-height: 120px;
    /* 133% */
    color: #183D4A;
    /* logo gray */
    margin: 0 0 28px 0;
    width: 100%;
}

.description {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 40px;
    /* 200% */
    color: #183D4A;
    /* logo gray */
    margin: 0;
    width: 100%;
}

.description-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}

.description-item:last-child {
    margin-bottom: 0;
}

.description-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 6px;
    height: 6px;
    background-color: #183D4A;
    border-radius: 50%;
}

/* ===================================
   RIGHT SIDE - IMAGE SECTION
   =================================== */

.image-section {
    position: relative;
    width: 50%;
    max-width: 841.5px;
    height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Star Decoration */
.star-decoration {
    position: absolute;
    width: 8%;
    max-width: 66px;
    height: auto;
    left: 30%;
    top: 6%;
    background: transparent;
    transform: rotate(16.67deg);
    z-index: 20;
}

/* Polygon Container */
.polygon-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 841.5px;
    aspect-ratio: 1;
    /* Adjusted layout */
}

/* Image Mask Container */
.image-mask {
    position: absolute;
    width: 83%;
    height: 83%;
    left: 0;
    top: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    z-index: 2;
}

/* Facility Image (Triangle) */
.facility-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    transform: none;
    object-fit: cover;
}

/* Polygon Overlay */
.polygon-overlay {
    display: none;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Large Desktop Screens */
@media (min-width: 1440px) and (max-width: 2560px) {
    .service-section {
        min-height: auto;
        padding: 100px 50px 60px;
    }

    .content-wrapper {
        max-width: 1600px;
        gap: 40px;
        align-items: start;
        padding-top: 5%;
    }

    .text-content {
        width: 55%;
        max-width: 800px;
        padding-top: 0;
    }

    .page-title {
        font-size: 100px;
        line-height: 140px;
        margin-bottom: 32px;
    }

    .description {
        font-size: 22px;
        line-height: 44px;
        width: 100%;
    }

    .description-item {
        padding-left: 22px;
        margin-bottom: 22px;
    }

    .description-item::before {
        width: 7px;
        height: 7px;
        top: 20px;
    }

    .image-section {
        width: 45%;
        max-width: 800px;
        align-items: center;
        top: 10px;
    }

    .star-decoration {
        width: 90px;
        max-width: none;
        left: 2%;
        top: 10px;
    }

    .polygon-container {
        max-height: 800px;
    }
}

/* Ultra Wide Screens */
@media (min-width: 2560px) {
    .service-section {
        min-height: auto;
        padding: 100px 20px 60px;
    }

    .content-wrapper {
        max-width: 2300px;
        gap: 60px;
        align-items: start;
        padding-top: 10%;
    }

    .text-content {
        width: 60%;
        max-width: 1200px;
        padding-top: 0;
    }

    .page-title {
        font-size: 140px;
        line-height: 180px;
        margin-bottom: 50px;
    }

    .description {
        font-size: 28px;
        line-height: 56px;
        width: 100%;
    }

    .description-item {
        padding-left: 24px;
        margin-bottom: 24px;
    }

    .description-item::before {
        width: 8px;
        height: 8px;
        top: 22px;
    }

    .image-section {
        width: 50%;
        max-width: 1200px;
        align-items: center;
        top: -100px;
    }

    .star-decoration {
        width: 120px;
        max-width: none;
        left: 10%;
        top: 0px;
    }

    .polygon-container {
        max-height: 1200px;
    }
}

/* Tablet */
@media (min-width: 1024px) and (max-width: 1440px) {
    .service-section {
        min-height: auto;
        padding: 120px 40px 40px;
        padding-right: 0;
    }

    .content-wrapper {
        flex-direction: row;
        align-items: stretch;
        gap: 30px;
    }

    .text-content {
        width: 48%;
        max-width: none;
        padding-top: 0;
    }

    .page-title {
        font-size: 70px;
        line-height: 90px;
        width: 100%;
    }

    .description {
        font-size: 18px;
        line-height: 36px;
        width: 100%;
    }

    .image-section {
        width: 48%;
        height: auto;
        margin-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 50px;
    }

    .polygon-container {
        width: 100%;
        height: 100%;
        max-height: 600px;
        aspect-ratio: 1;
    }

    .image-mask {
        width: 85%;
        height: 85%;
    }

    .facility-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .star-decoration {
        width: 100%;
        max-width: 80px;
        left: 10%;
        top: 5%;
    }
}

/* Small Desktop / Large Tablet */
@media (min-width: 767px) and (max-width: 1024px) {
    .service-section {
        min-height: auto;
        padding: 90px 30px 50px;
    }

    .content-wrapper {
        max-width: 1200px;
        gap: 35px;
    }

    .text-content {
        width: 50%;
        max-width: 600px;
        padding-top: 0;
    }

    .page-title {
        font-size: 50px;
        line-height: 110px;
        margin-bottom: 30px;
    }

    .description {
        font-size: 16px;
        line-height: 30px;
        width: 100%;
    }

    .description-item {
        padding-left: 20px;
        margin-bottom: 18px;
    }

    .description-item::before {
        width: 6px;
        height: 6px;
        top: 16px;
    }

    .image-section {
        width: 50%;
        max-width: 700px;
        left: -20px;
    }

    .star-decoration {
        width: 70px;
        max-width: none;
        left: 20%;
        top: 8%;
    }

    .polygon-container {
        max-height: 420px;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 767px) and (min-width: 500px) {
    .service-section {
        padding: 100px 15px 30px;
    }

    .content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: auto;
    }

    .text-content {
        display: contents;
        width: 100%;
        max-width: 100%;
        padding-top: 0;
    }

    .page-title {
        order: 1;
        text-align: center;
        font-size: 40px;
        line-height: 56px;
        width: 100%;
        margin-bottom: 20px;
        padding: 0 20px;
    }

    .image-section {
        order: 2;
        width: 90%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .description {
        order: 3;
        font-size: 16px;
        line-height: 32px;
        width: 90%;
        padding: 0;
        align-self: flex-start;
    }

    .polygon-container {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-mask {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        left: -5%;
    }

    .facility-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .star-decoration {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 500px) {
    .service-section {
        padding: 80px 15px 30px;
    }

    .content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: auto;
    }

    .text-content {
        display: contents;
        width: 100%;
        max-width: 100%;
        padding-top: 0;
    }

    .page-title {
        order: 1;
        text-align: center;
        font-size: 32px;
        line-height: 44px;
        width: 100%;
        margin-bottom: 20px;
        padding: 0 20px;
    }

    .image-section {
        order: 2;
        width: 90%;
        max-width: 350px;
        height: auto;
        aspect-ratio: 1;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .description {
        order: 3;
        font-size: 14px;
        line-height: 28px;
        width: 90%;
        padding: 0;
        align-self: flex-start;
    }

    .polygon-container {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-mask {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        left: -5%;
    }

    .facility-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .star-decoration {
        display: none;
    }
}

/* ===================================
   REUSABLE CALLOUT SECTION
   For highlighted content boxes with gradient accent
   =================================== */

.callout-section {
    position: relative;
    width: 100%;
    min-height: 395px;
    background: #F0EFE7;
    padding: 0;
    overflow: hidden;
}

.callout-wrapper {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 115px;
    min-height: 395px;
    display: flex;
    align-items: center;
}

/* Decorative Circles */
.decorative-circles {
    position: absolute;
    left: 115px;
    top: 25px;
    width: 120px;
    height: 120px;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(19, 194, 207, 0.75) 20.19%, #183D4A 100%);
}

.circle-large {
    width: 50.67px;
    height: 50.67px;
    right: 0;
    bottom: 0;
}

.circle-medium {
    width: 38px;
    height: 38px;
    left: 25px;
    top: 25px;
}

.circle-small {
    width: 25.33px;
    height: 25.33px;
    left: 0;
    top: 0;
}

/* Callout Content Box */
.callout-content {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 165px;
    max-width: 953px;
}

/* Reset default animate-on-scroll for callouts to prevent text from moving */
.callout-section .callout-content.animate-on-scroll {
    opacity: 1;
    transform: none;
}

.callout-accent {
    position: relative;
    width: 100%;
    max-width: 900px;
    min-height: 308px;
    background: transparent;
    border-radius: 0px 100px 100px 100px;
    padding: 38px 67px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.callout-accent::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(19, 194, 207, 0.5) 15%, #13C2CF 100%);
    border-radius: inherit;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-on-scroll.visible .callout-accent::before {
    transform: scaleX(1);
}

.callout-text {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 26px;
    line-height: 50px;
    color: #183D4A;
    margin: 0;
}

/* Star Decoration for Callout */
.callout-star {
    position: absolute;
    right: 294px;
    top: 0;
    width: 66px;
    height: 66px;
    transform: rotate(16.67deg);
    z-index: 1;
}

.callout-star img {
    width: 100%;
    height: auto;
}

/* ===================================
   CALLOUT SECTION - RESPONSIVE STYLES
   =================================== */

/* Ultra Wide - 2560px+ */
@media (min-width: 2560px) {
    .callout-wrapper {
        max-width: 2300px;
        padding: 0 150px;
    }

    .callout-text {
        font-size: 26px;
        line-height: 56px;
    }

    .callout-star {
        width: 90px;
        height: 90px;
    }
}

/* Large Desktop - 1440px to 2560px */
@media (min-width: 1440px) and (max-width: 2559px) {
    .callout-wrapper {
        max-width: 1600px;
        padding: 0 120px;
    }

    .callout-text {
        font-size: 24px;
        line-height: 52px;
    }
}

/* Medium Desktop - 1025px to 1439px */
@media (min-width: 1025px) and (max-width: 1439px) {
    .callout-wrapper {
        padding: 0 80px;
    }

    .callout-star {
        right: 150px;
    }
}

/* Tablet - max 1024px */
@media (max-width: 1024px) {
    .callout-section {
        min-height: auto;
    }

    .callout-wrapper {
        padding: 40px 30px;
        min-height: auto;
        flex-direction: column;
    }

    .decorative-circles {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 20px;
    }

    .callout-content {
        margin-left: 0;
        max-width: 100%;
    }

    .callout-accent {
        width: 150px;
        min-height: 180px;
    }

    .callout-text {
        font-size: 18px;
        line-height: 40px;
        padding: 30px 15px 30px 170px;
    }

    .callout-star {
        right: 20px;
        top: 100px;
    }
}

/* Mobile - max 768px */
@media (max-width: 768px) {
    .callout-wrapper {
        padding: 30px 20px;
    }

    .decorative-circles {
        transform: scale(0.8);
        margin-bottom: 10px;
    }

    .callout-content {
        margin-top: 10px;
    }

    .callout-accent {
        width: 80px;
        min-height: 150px;
        border-radius: 0px 50px 50px 50px;
    }

    .callout-text {
        font-size: 16px;
        line-height: 32px;
        padding: 20px 10px 20px 100px;
    }

    .callout-star {
        display: none;
    }
}

/* Small Mobile - max 480px */
@media (max-width: 480px) {
    .callout-text {
        font-size: 15px;
        line-height: 28px;
        padding: 20px 10px 20px 80px;
    }

}


/* ===================================
   REUSABLE SERVICE CTA SECTION
   (Gold Background, Gray Content Box)
   =================================== */

.service-cta-section {
    background: var(--beige);
    padding: 100px 0 150px;
}

.service-cta-wrapper {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    height: 160px;
}

.service-cta-box {
    position: relative;
    width: 100%;
    height: 100%;
}

.service-cta-bg-layer {
    position: absolute;
    width: 100%;
    height: 110px;
    left: -8px;
    top: 8px;
    background: var(--nav-bar-gold);
    z-index: 1;
}

.service-cta-content-layer {
    position: absolute;
    width: 100%;
    height: 110px;
    left: 0;
    top: 0;
    background: var(--logo-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.service-cta-text {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 36px;
    line-height: 55px;
    /* Added line-height for consistency */
    color: var(--nav-bar-gold);
    margin: 0;
    padding: 0 20px;
    /* Ensure padding for text wrapping */
    text-align: center;
    /* Center text especially when wrapping */
}

/* Specific class for phone number to prevent breaking */
.service-phone-number {
    white-space: nowrap;
}

.service-cta-star {
    position: absolute;
    right: 0;
    bottom: -40px;
    width: 66px;
    transform: rotate(16.67deg);
}

/* Responsive Styles for CTA */

@media (max-width: 1024px) {
    .service-cta-text {
        font-size: 24px;
        padding: 0 20px;
        text-align: center;
        line-height: 36px;
    }
}

@media (max-width: 768px) {
    .service-cta-section {
        padding: 50px 0 100px;
        /* Adjusted padding for mobile */
    }

    .service-cta-wrapper {
        height: auto;
        padding-bottom: 60px;
    }

    .service-cta-bg-layer {
        display: none;
        /* Hide decorative background on mobile for cleaner look */
    }

    .service-cta-content-layer {
        position: relative;
        left: auto;
        top: auto;
        background: var(--logo-gray);
        width: 100%;
        height: auto;
        padding: 40px 20px;
        display: flex;
        /* Ensure flex is kept */
        flex-direction: column;
        /* Allow content to stack if needed */
    }

    .service-cta-text {
        font-size: 20px;
        line-height: 30px;
    }
}