/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1A2E3D;
    --primary-dark: #00334C;
    --secondary-color: #1A3C40;
    --accent-blue: #4C8DAA;
    --text-dark: #1A2E3D;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --gradient-1: linear-gradient(135deg, #1A2E3D 0%, #00334C 100%);
    --gradient-2: linear-gradient(135deg, #1A3C40 0%, #1A2E3D 100%);
    --gradient-3: linear-gradient(135deg, #00334C 0%, #1A3C40 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* PC screens: use 80% of viewport width */
@media (min-width: 1024px) {
    .container {
        max-width: 80vw;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    z-index: -2;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(26, 46, 61, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 51, 76, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(26, 60, 64, 0.3) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    z-index: 1;
}

.hero-title {
    font-size: clamp(1.875rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.8s ease;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.25rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 10px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

/* About Section */
.about {
    padding: 100px 20px;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    text-align: center;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: center;
}

/* Services Section */
.services {
    padding: 100px 20px;
    background: var(--bg-light);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-top: 3rem;
    justify-content: center;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    width: 100%;
    max-width: 320px;
    flex: 0 1 320px;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-features li {
    padding: 0.2rem 0;
    padding-left: 1.25rem;
    color: var(--text-light);
    position: relative;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    width: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.8125rem;
}

/* Technologies Section */
.technologies {
    padding: 100px 20px;
    background: var(--bg-white);
    overflow: hidden;
}

.tech-carousel-wrapper {
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    --tech-item-width: 150px;
    --tech-gap: 3rem;
    --tech-offset: calc((var(--tech-item-width) + var(--tech-gap)) / 2);
}

.tech-carousel-rows {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tech-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tech-carousel-track-offset {
    /* 50% offset applied in JS so row 2 shows different logos than row 1 */
    width: 100%;
    overflow: hidden;
}

.tech-carousel-track,
.tech-carousel-track-2 {
    display: flex;
    gap: 3rem;
    will-change: transform;
    transition: transform 0.15s ease;
}

/* Animation is driven by JS for seamless loop */

.tech-item.focused {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 0 0 3px rgba(76, 141, 170, 0.2), var(--shadow-xl);
    background: white;
    border-color: var(--accent-blue);
    z-index: 10;
}

.tech-item.focused .tech-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.tech-item {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.tech-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.tech-item:hover .tech-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Tech carousel scrollbar – track with a dot moving inside */
.tech-carousel-slider-wrapper {
    margin-top: 2.5rem;
    padding: 1rem 0;
    width: 30%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tech-carousel-slider-track {
    position: relative;
    width: 100%;
    height: 16px;
    display: flex;
    align-items: center;
    /* Visual bar: 8px strip centered inside 16px */
    background: linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        rgba(26, 46, 61, 0.12) 4px,
        rgba(26, 46, 61, 0.12) 12px,
        transparent 12px
    );
    border-radius: 4px;
}

.tech-carousel-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    background: transparent;
    border-radius: 4px;
    outline: none;
    margin: 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.tech-carousel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-dark);
    border: none;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    margin-top: 0;
}

.tech-carousel-slider::-webkit-slider-thumb:hover {
    background: var(--primary-color);
}

.tech-carousel-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.tech-carousel-slider::-webkit-slider-runnable-track {
    height: 16px;
    background: transparent;
    border-radius: 4px;
}

.tech-carousel-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-dark);
    border: none;
    box-shadow: var(--shadow-sm);
    cursor: grab;
}

.tech-carousel-slider::-moz-range-thumb:hover {
    background: var(--primary-color);
}

.tech-carousel-slider::-moz-range-track {
    height: 16px;
    background: transparent;
    border-radius: 4px;
}

@keyframes scroll-tech {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: var(--bg-white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 46, 61, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    margin-top: 1rem;
}

.contact-form button.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.contact-form button.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 48px 20px 24px;
    font-size: 0.8125rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    font-size: 0.8125rem;
}

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

.footer-section ul li {
    margin-bottom: 0.35rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8125rem;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-links .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.3s ease, color 0.3s ease;
}

.social-links .social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.social-links .social-icon svg {
    width: 18px;
    height: 18px;
}

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

.footer-bottom p {
    margin: 0;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .logo-img {
        height: 35px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .services-grid .service-card {
        max-width: 100%;
    }

    .tech-carousel-wrapper {
        --tech-item-width: 120px;
        --tech-gap: 2rem;
    }

    .tech-item {
        width: 120px;
        height: 80px;
        padding: 1rem;
    }

    .tech-item.focused {
        transform: translateY(-8px) scale(1.08);
    }

    .tech-carousel-track,
    .tech-carousel-track-2 {
        gap: 2rem;
    }

    .tech-carousel-slider-wrapper {
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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

    .section-title {
        font-size: 1.75rem;
    }

    .service-card,
    .contact-form {
        padding: 1.5rem;
    }

    .logo-img {
        height: 30px;
    }

    .footer-logo-img {
        height: 28px;
    }

    .tech-carousel-wrapper {
        --tech-item-width: 100px;
        --tech-gap: 1.5rem;
    }

    .tech-item {
        width: 100px;
        height: 70px;
        padding: 0.75rem;
    }

    .tech-item.focused {
        transform: translateY(-6px) scale(1.06);
    }

    .tech-carousel-track,
    .tech-carousel-track-2 {
        gap: 1.5rem;
    }

    .tech-carousel-slider-wrapper {
        margin-top: 1.5rem;
    }

    .tech-carousel-slider-track {
        height: 14px;
        background: linear-gradient(
            to bottom,
            transparent 0,
            transparent 3px,
            rgba(26, 46, 61, 0.12) 3px,
            rgba(26, 46, 61, 0.12) 11px,
            transparent 11px
        );
    }

    .tech-carousel-slider,
    .tech-carousel-slider::-webkit-slider-runnable-track {
        height: 14px;
    }

    .tech-carousel-slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
        margin-top: 0;
    }

    .tech-carousel-slider::-moz-range-thumb,
    .tech-carousel-slider::-moz-range-track {
        height: 14px;
    }

    .tech-carousel-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
}
