/* Home Page Specific CSS */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    /* Navbar space */
    padding-bottom: 50px;
    overflow: hidden;
}

/* Background Slideshow */
.hero-bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* Removed transform: scale(1.05) and transform transition */
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    /* Removed transform: scale(1) and animation: kenBurns */
}


/* Tagline Animation */
.tagline-top {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInDown 1s forwards 0.2s;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tagline-top.fade-out {
    opacity: 0 !important;
    transform: translateY(-20px);
}

.tagline-top.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: taglineFadeIn 0.8s ease forwards;
}

@keyframes taglineFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 65, 78, 0.338), rgba(7, 58, 65, 0.382));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.tagline-top {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInDown 1s forwards 0.2s;
}

.hero-title {
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 2rem;
    word-wrap: break-word;
    /* Prevent long words from overflowing */

    opacity: 0;
    color: var(--color-accent-white);
    animation: fadeIn 1.5s ease-in-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Simple Fade Animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.hero-title .highlight {
    color: var(--color-accent-cyan);
    position: relative;
    display: inline-block;
}

.tagline-top {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInDown 1s forwards 0.2s;
}

#heroTagline.fade-in {
    opacity: 1;
    animation: fadeIn 1.5s ease-in-out forwards;
}

#heroTagline.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;

}

.service-buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.8s;
}

.service-btn-card {
    background: linear-gradient(135deg, #3d7cac 0%, #3a54e4 100%);
    border: none;
    border-radius: 0 25px 0 25px;
    padding: 5.5rem 2rem 2rem 2rem;
    width: 300px;
    max-width: 90vw;
    /* Ensure it fits on small screens */
    height: 280px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 20px 40px rgba(94, 114, 228, 0.35),
        0 10px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: visible;
    margin-top: 80px;
}

.service-btn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 0 25px 0 25px;
    pointer-events: none;
}

.service-btn-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 30px 60px rgba(94, 114, 228, 0.45),
        0 15px 35px rgba(0, 0, 0, 0.2);
}

.service-card-icon {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
    transition: all 0.4s ease;
    z-index: 10;
}

@media (max-width: 768px) {
    .service-card-icon {
        width: 220px;
        height: 220px;
        top: -90px;
        /* Adjusted to fit the smaller icon */
        max-width: 100%;
        /* Safety constraint */
    }

    .service-btn-card {
        width: 100%;
        max-width: 260px;
        height: 240px;
        /* Slightly reduced height */
        margin-left: auto;
        margin-right: auto;
    }

    .hero-section {
        max-height: 90vh;
    }

}

.service-btn-card:hover .service-card-icon {
    transform: translateX(-50%) translateY(-10px) scale(1.05);
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.35));
}

.service-card-text {
    text-align: center;
    position: relative;
    z-index: 5;
}

.service-card-text h3 {
    font-size: 1.6rem;
    margin-bottom: 0.7rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
    line-height: 1.3;
}

.service-card-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* Right Side Scroll Indicator */
.scroll-indicator-right {
    position: absolute;
    right: 30px;
    bottom: 40px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.scroll-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 2px;
    animation: scrollTextBounce 1s ease-in-out infinite;
    padding-left: 140px;

}

@keyframes scrollTextBounce {

    0%,
    100% {
        transform: rotate(180deg) translateY(20px);
    }

    50% {
        transform: rotate(180deg) translateY(0);
    }
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    transform-origin: bottom;
    animation: linePulse 1s ease-in-out infinite;
    right: 70px;
}

@keyframes linePulse {

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

    50% {
        transform: scaleY(0.5);
        opacity: 0.6;
    }
}

.scroll-indicator-right:hover .scroll-text {
    color: #0f2049;
}

.scroll-indicator-right:hover .scroll-line {
    background: #0f2049;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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


/* Scroll Animation Section (Sticky) */
.scroll-services-section {
    position: relative;
    padding: 5rem 0;
    background: white;
}

.sticky-container {
    display: flex;
    align-items: flex-start;
}

.services-text-col {
    width: 50%;
    padding: 2rem 4rem;
}

.service-block {
    min-height: 80vh;
    /* Make each block tall enough to scroll */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.5s;
}

.service-block.active {
    opacity: 1;
}

.service-block h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.service-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.services-image-col {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
}

.image-stack {
    position: relative;
    width: 50%;
    height: 50%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.service-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 1s ease;
    transform: scale(1.1);
}

.service-img.active {
    opacity: 1;
    transform: scale(1);
}


/* Who We Are */
.who-we-are {
    padding: 5rem 0;
    background: var(--color-bg-light);
    text-align: center;
}

.who-content {
    max-width: 800px;
    margin: 0 auto;
}

/* News Section */
.news-section {
    padding: 5rem 0;
    background: white;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.news-date {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent-cyan));
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.news-date .date-day {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.news-date .date-month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.95;
}

.news-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    background: rgba(89, 230, 255, 0.15);
    color: var(--color-primary-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.news-link {
    color: var(--color-accent-cyan);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.news-link:hover {
    color: var(--color-primary-dark);
    gap: 0.8rem;
}

.news-link i {
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(5px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scroll-indicator-right {
        right: 15px;
        gap: 10px;
    }

    .scroll-text {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .scroll-line {
        width: 1px;
        height: 40px;
    }

    .hero-title {
        font-size: 2rem;
        /* Reduced from 2.5rem */
    }

    .tagline-top {
        font-size: 0.9rem;
    }

    .lead {
        font-size: 0.95rem !important;
    }

    .sticky-container {
        flex-direction: column;
    }

    .services-text-col {
        width: 100%;
        padding: 1.5rem;
    }

    .services-image-col {
        display: none;
    }

    .service-block {
        min-height: auto;
        margin-bottom: 2rem;
        opacity: 1;
    }

    .service-btn-card {
        width: 100%;
        max-width: 260px;
        margin-bottom: 15px;
    }

    .service-card-text h3 {
        font-size: 1.2rem;
    }

    .service-card-text p {
        font-size: 0.85rem;
    }

    .about-content h2 {
        font-size: 1.5rem;
    }

    .news-card h4 {
        font-size: 1.1rem;
    }

    .who-we-are,
    .news-section {
        padding: 2.5rem 0;
    }

    .fixed-quote-section {
        padding: 3rem 1rem;
    }

    .quote-content h3 {
        font-size: 1.4rem !important;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .service-btn-card {
        width: 250px;
        margin: 8rem auto 2rem;
    }

    .service-card-icon {
        width: 350px;
        height: 350px;
        top: -180px;
    }
}

/* Mobile Toggle Logic for Home Page Navbar */
@media (max-width: 991px) {
    /* --- Initial State (At Top / Not Scrolled) --- */

    /* Hide the hamburger menu toggler initially */
    .navbar:not(.scrolled) .navbar-toggler {
        display: none !important;
    }

    /* Show the outer "Get Touch" button initially */
    .navbar:not(.scrolled) .mobile-outer-btn {
        display: inline-block !important;
        /* or block depending on layout */
    }

    /* Hide the inner button container initially (default, but explicit is good) */
    .navbar:not(.scrolled) .mobile-inner-btn-container {
        display: none !important;
    }


    /* --- Scrolled State (User scrolls down) --- */

    /* Show the hamburger menu toggler when scrolled */
    .navbar.scrolled .navbar-toggler {
        display: inline-block !important;
        /* Standard bootstrap display */
    }

    /* Hide the outer "Get Touch" button when scrolled */
    .navbar.scrolled .mobile-outer-btn {
        display: none !important;
    }

    /* Enable the inner button container to be shown inside the menu (it's inside collapse, so collapse handles visibility) */
    .navbar.scrolled .mobile-inner-btn-container {
        display: block;
        margin-top: 10px;
        width: 100%;
        text-align: left;
    }

    .navbar.scrolled .mobile-inner-btn-container .btn {
        width: 100%;
        text-align: center;
    }
}

/* Customized Contact Button for Home Page */
.home-contact-btn {
    font-size: 0.7rem !important;
    font-weight: 400 !important;
    padding: 8px 16px !important;
    min-width: auto !important;
}
