/* ============================================================
   HERO SLIDER — SPEED + CLS OPTIMIZED
============================================================ */

#hero {
    position: relative;
    width: 100%;
    height: 90vh;
    min-height: 500px;
    overflow: hidden;

    /* Helps LCP */
    background: #000;
}

/* Prevent CLS by forcing hero-slide to fit exactly */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;

    opacity: 0;
    transition: opacity 1.2s ease-out;

    /* GPU acceleration */
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
}

/* HERO CONTENT (Improved contrast + spacing) */
.hero-content {
    position: absolute;
    bottom: 18%;
    left: 5%;
    max-width: 600px;

    background: rgba(0, 0, 0, 0.45);
    padding: 28px;
    border-radius: 10px;
    color: #fff;

    animation: fadeUp 0.9s ease forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content h2 span {
    color: var(--accent1);
    text-shadow: 1px 2px 4px rgba(0,0,0,0.7);
}

.hero-content p {
    margin: 12px 0 18px;
    font-size: 1.05rem;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* CTA BUTTON (Accessibility improved) */
.btn-get-started {
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 6px;
    background: var(--accent1);
    color: #fff;
    text-decoration: none;
    transition: background 0.25s ease;
}

.btn-get-started:hover {
    background: var(--accent2);
}

/* Slider Arrows */
.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 48px;
    height: 48px;
    font-size: 28px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #fff;
    cursor: pointer;
    z-index: 1000;

    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);

    transition: background 0.3s ease, transform 0.3s ease;

    /* Touch friendly */
    touch-action: manipulation;
}

.hero-control:hover {
    background: rgba(0,0,0,0.55);
    transform: translateY(-50%) scale(1.08);
}

.hero-control.prev { left: 18px; }
.hero-control.next { right: 18px; }

/* Slider Indicators */
#heroIndicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

#heroIndicators span {
    width: 13px;
    height: 13px;

    background: rgba(255,255,255,0.55);
    border-radius: 50%;
    cursor: pointer;

    transition: transform .25s, background .25s;
}

#heroIndicators .active-dot {
    background: var(--accent1);
    transform: scale(1.3);
}

/* ============================================================
   ABOUT PREVIEW — Optimized
============================================================ */
.about-preview {
    padding: 70px 0;
    background: #f7f7f7;
    text-align: center;
}

.about-preview h2 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--primary);
}

.about-preview p {
    max-width: 720px;
    margin: 18px auto;
    font-size: 1.08rem;
    line-height: 1.65;
}

.learn-more-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background .3s ease;
}

.learn-more-btn:hover {
    background: var(--accent2);
}

/* ============================================================
   SERVICES PREVIEW
============================================================ */
.home-services {
    padding: 70px 0;
    text-align: center;
}

.home-services h2 {
    color: var(--primary);
}

.service-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
}

.service-card {
    flex: 1 1 250px;
    max-width: 280px;
    background: white;

    border-radius: 10px;
    padding: 18px;

    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Section for img*/
.service-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;

    border-radius: 10px;
}

.service-card h3 {
    margin-top: 10px;
    font-family: var(--font-heading);
}

/* ============================================================
   PORTFOLIO PREVIEW
============================================================ */
.portfolio-preview {
    padding: 70px 0;
    background: #f7f7f7;
    text-align: center;
}

.portfolio-card {
    flex: 1 1 250px;
    max-width: 300px;

    background: white;
    border-radius: 10px;
    overflow: hidden;

    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.portfolio-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* ============================================================
   CTA SECTION
============================================================ */
.cta-section {
    padding: 80px 0;
    background: var(--primary);
    color: white;
    text-align: center;
}

.cta-btn {
    padding: 12px 28px;
    background: var(--accent1);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.25s ease;
}

.cta-btn:hover {
    background: var(--accent2);
}

/* ============================================================
   MOBILE RESPONSIVENESS
============================================================ */
@media (max-width: 768px) {
    #hero {
        height: 70vh;
        min-height: 420px;
    }

    .hero-content {
        max-width: 90%;
        bottom: 15%;
    }

    .hero-control {
        display: none; /* Touch gestures replace arrows */
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 18px;
        bottom: 12%;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }
}
