/* Font faces */
@font-face {
    font-family: 'SF Pro Display';
    src: local('SF Pro Display'), local('SFProDisplay-Regular');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Base styles */
:root {
    --primary-color: #010066; /* Dark blue from Malaysian flag */
    --secondary-color: #ffcc00; /* Yellow from Malaysian flag */
    --accent-color: #d0103a; /* Red from Malaysian flag */
    --text-color: #000000; /* Black for text */
    --light-text: #ffffff; /* White for light text */
    --bg-color: #ffffff; /* White background */
    --card-bg: rgba(255, 255, 255, 0.85); /* Slightly transparent white */
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(1, 0, 102, 0.15) 0%, rgba(255, 204, 0, 0.15) 90%),
                radial-gradient(circle at 90% 80%, rgba(208, 16, 58, 0.15) 0%, rgba(255, 255, 255, 0.15) 90%);
    z-index: -1;
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between the image and text */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-image {
    height: 50px; /* Adjust height as needed */
    width: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the image fits within the height */
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.5rem);
}

p {
    font-family: 'Inter', 'sans-serif';
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Hero section */
.hero {
    padding: 150px 0 100px;
    position: relative;
}

.hero .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
    max-width: 600px; /* Limit the width of the text content */
    text-align: left; /* Align text to the left */
}

.hero-image {
    flex: 1;
    max-width: 100%; /* Limit the width of the image */
    min-height: 300px; /* Set a minimum height */
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    
}

.hero-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px; /* Adjust spacing between elements */
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
}

.static-text {
    white-space: nowrap; /* Prevent wrapping of static text */
}

.gradient-text {
    background: linear-gradient(60deg, #010066, #ffcc00, #d0103a, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

#typewriter {
    display: inline-block;
    border-right: 2px solid var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    animation: blink 0.7s step-end infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.9;
}

.image-slider {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-image.before {
    clip-path: inset(0 50% 0 0); 
    transition: clip-path 0.01s ease;
    z-index: 2;
}

.slider-image.after {
    z-index: 1;
}

.slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    top: 0;
    left: 0;
    z-index: 3;
    cursor: ew-resize;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 400px;
    background: white;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button::before {
    content: '↔';
    font-size: 20px;
    color: var(--primary-color);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
    display: block;
}

/* Sections */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* About section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* Technology section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.tech-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.tech-card:hover {
    transform: translateY(-10px);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.tech-image {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.tech-image:hover {
    transform: translateY(-10px);
    transition: var(--transition);
}

/* Gallery section */
.gallery-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
}

.gallery-scroll {
    display: flex;
    gap: 30px;
    padding-bottom: 20px;
    width: max-content;
}

.gallery-item {
    width: 350px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.image-comparison {
    position: relative;
    width: 100%;
    height: 300px;
}

.image-comparison img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-comparison .before {
    z-index: 2;
    clip-path: inset(0 50% 0 0); 
    transition: clip-path 0.01s ease;
}

.image-comparison .after {
    z-index: 1;
}

.image-comparison .slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    top: 0;
    left: 0;
    z-index: 3;
    cursor: ew-resize;
}

.image-comparison .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 300px;
    background: white;
    cursor: ew-resize;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.image-description {
    padding: 20px;
}

.image-description h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.image-description p {
    font-size: 0.9rem;
    color: #666;
}

/* Contact section */
.contact-content {
    display: flex;
    gap: 50px;
    background-color: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: var(--light-text);
    margin-bottom: 15px;
    display: inline-block;
}

.footer-links h4,
.footer-social h4 {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--light-text);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 50px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav.active {
        transform: translateY(0);
    }
    
    .nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 20px;
    }

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

    .hero-content {
        text-align: center; 
        margin-bottom: 20px;
    }

    .hero-image {
        width: 100%; 
        min-height: 250px; 
        display: block; 
    }

    .image-slider {
        min-height: 250px;
        display: block; 
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .image-slider {
        height: 300px;
    }
    
    .gallery-item {
        width: 300px;
    }
}