:root {
    --primary-color: #003366;
    --secondary-color: #001f3f;
    --accent-color: #00ccff;
    --text-color: #ffffff;
    --background-color: #000033;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Add smooth scroll only for anchor links */
html {
    scroll-behavior: auto;
}

html.smooth-scroll {
    scroll-behavior: smooth;
}

.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    z-index: 3;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    margin: 0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin: 1.5rem 0 2.5rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.button-group {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: min(400px, 90%);
    padding: 0 1rem;
    margin: 0 auto;
    justify-content: center;
}

.primary-button {
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background-color: var(--accent-color);
    color: var(--background-color);
}

.primary-button:active {
    transform: translateY(1px);
}

#services {
    position: relative;
    background-color: transparent;
    padding: 6rem 1rem;
}

.services-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 51, 0.85), rgba(0, 0, 51, 0.95));
    z-index: 1;
}

.services-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 2;
}

.services-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--text-color);
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.service-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.service-content {
    padding: 2rem;
}

.service-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.service-content h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--text-color);
    margin: 0.5rem 0 1rem;
}

.service-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.water-drop {
    position: relative;
    width: 40px;
    height: 40px;
    margin-bottom: 2rem;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    opacity: 0;
    animation: ripple 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ripple:nth-child(2) {
    animation-delay: 0.3s;
}

.ripple:nth-child(3) {
    animation-delay: 0.6s;
}

.loading-text {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.5s;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.6;
        border-width: 1px;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 1rem;
    }

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

    .hero-subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
        margin: 1rem 0 2rem;
    }

    .button-group {
        gap: 1rem;
    }

    .primary-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .services-grid {
        gap: 1.5rem;
    }

    .service-card {
        transform: none !important;
    }

    .service-image {
        height: 200px;
    }

    .service-content {
        padding: 1.5rem;
    }

    .service-content h3 {
        font-size: 1.3rem;
    }

    .service-content p {
        font-size: 0.9rem;
    }

    .service-category {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .water-drop {
        width: 30px;
        height: 30px;
    }

    .loading-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0.8rem 0 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .service-image {
        height: 180px;
    }

    .service-content {
        padding: 1.2rem;
    }

    .service-category {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    .water-drop {
        width: 25px;
        height: 25px;
    }

    .loading-text {
        font-size: 1rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-content {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin: 0.5rem 0 1rem;
    }

    .button-group {
        margin-top: 0.5rem;
    }

    .primary-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

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

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: cover;
    transform: scale(1.1);
    transition: opacity 2s ease-in-out, transform 10s ease-in-out;
}

.slideshow-image.active {
    opacity: 0.15;
    transform: scale(1);
}

.slideshow-image.next {
    opacity: 0;
    transform: scale(1.1);
}

/* About Us Portal */
.about-drop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(0, 204, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: dropFloat 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes dropFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-10px, -10px) scale(1.05);
    }
    50% {
        transform: translate(5px, -15px) scale(1);
    }
    75% {
        transform: translate(-5px, -5px) scale(0.95);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

.about-drop::before {
    content: 'About';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.about-drop:hover::before {
    opacity: 1;
}

.drop-shine {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.drop-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 70%);
    border-radius: 50%;
    animation: shineMove 6s ease-in-out infinite;
}

@keyframes shineMove {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2) translate(2px, -2px);
        opacity: 0.6;
    }
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
}

.about-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 51, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-portal.active {
    opacity: 1;
    visibility: visible;
}

.portal-content {
    max-width: 800px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    position: relative;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-portal.active .portal-content {
    transform: scale(1);
    opacity: 1;
}

.portal-content h2 {
    color: var(--accent-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.portal-text {
    color: var(--text-color);
    line-height: 1.8;
}

.portal-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.portal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portal-close i {
    color: var(--text-color);
    font-size: 1.2rem;
}

.portal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .about-drop {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .portal-content {
        margin: 1rem;
        padding: 2rem;
    }

    .portal-content h2 {
        font-size: 2rem;
    }

    .portal-text p {
        font-size: 1rem;
    }
}

/* Optimize touch scrolling */
@media (hover: none) and (pointer: coarse) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card {
        transform: none !important;
    }
}