@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: white;
    background: #000205;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll on mobile */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 2, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

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

.nav-menu a:hover {
    color: #fff;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1000;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: white;
    color: #000205;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    background: #000205;
}

@supports (height: 100dvh) {
    .hero-section {
        height: 100dvh;
    }
}

#magic {
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

@supports (height: 100dvh) {
    #magic {
        height: 100dvh;
    }
}

/* Three.js canvas full screen fix */
#magic canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    pointer-events: none;
    /* Allow clicks to pass through to content below */
}

/* Mobile canvas fixes */
@media (max-width: 768px) {
    #magic canvas {
        width: 100% !important;
        height: 100% !important;
    }
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 6vh;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    z-index: 10;
    pointer-events: auto;
    /* Ensure content is clickable */
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cta-button:hover {
    background: white;
    color: #000205;
    transform: translateY(-2px);
}

@media (hover: none) {
    .cta-button:active {
        background: white;
        color: #000205;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background: rgba(0, 2, 5, 0.98);
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (hover: none) {
    .service-card:active {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    color: white;
    transition: transform 0.3s ease;
}

.service-icon svg {
    width: 48px;
    height: 48px;
    display: block;
}

.service-card:hover .service-icon {
    transform: translateY(-6px) scale(1.05);
}

.service-icon .emoji-icon {
    font-size: 2.5rem;
    line-height: 1;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* Service Modal */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

.service-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 2, 5, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 3rem;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    backdrop-filter: blur(20px);
    transform: scale(0.8) translateY(50px);
    transition: transform 0.4s ease;
}

.service-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

.modal-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-description {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.modal-details {
    margin-top: 2rem;
}

.modal-details h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-details ul {
    list-style: none;
    padding: 0;
}

.modal-details li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

.modal-details li:last-child {
    border-bottom: none;
}

.modal-details li::before {
    content: "✓";
    margin-right: 1rem;
    color: white;
    font-weight: bold;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: rgba(0, 2, 5, 0.95);
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 4rem;
}

.about-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: rgba(0, 2, 5, 0.98);
    position: relative;
    z-index: 1;
}

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

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

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

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-item a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.contact-item a:hover {
    opacity: 1;
}

.contact-item p {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    color: white;
}

.social-link svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.6;
}

.social-link.instagram {
    background: radial-gradient(circle at 20% 20%, #fdc468, #aa0a8f 70%);
    border-color: transparent;
}

.social-link.facebook {
    background: radial-gradient(circle at 30% 20%, #3b579d, #1d2c63 70%);
    border-color: transparent;
}

.social-link.linkedin {
    background: radial-gradient(circle at 20% 20%, #0e76a8, #053a61 70%);
    border-color: transparent;
}

.social-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.submit-btn {
    background: white;
    color: #000205;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    background: rgba(0, 2, 5, 1);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer p {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1.2rem 0;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .logo-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    .hamburger {
        display: flex;
        z-index: 1004;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(0, 2, 5, 0.98);
        width: 100%;
        height: 100vh;
        height: 100dvh;
        /* Dynamic viewport height for mobile */
        text-align: center;
        transition: 0.3s;
        padding: 5rem 0 2rem;
        border-top: none;
        backdrop-filter: blur(20px);
        gap: 1.5rem;
        z-index: 1000;
        overflow-y: auto;
    }

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

    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    .language-selector {
        position: fixed;
        right: 1rem;
        top: 1.5rem;
        z-index: 1003;
        flex-wrap: wrap;
        gap: 0.25rem;
        max-width: calc(100vw - 80px);
        /* Hamburger menu üçün yer burax */
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-width: 40px;
    }

    .hero-content {
        padding-top: 120px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
        letter-spacing: 2px;
        margin-bottom: 0.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 3rem;
        padding: 0 1rem;
    }

    .services-section {
        padding: 60px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.875rem;
    }

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

    .about-section {
        padding: 60px 0;
    }

    .about-text {
        font-size: 1rem;
        margin-bottom: 3rem;
        padding: 0 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .contact-section {
        padding: 60px 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-top: 2.5rem;
    }

    .contact-item {
        gap: 1rem;
    }

    .contact-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }

    .contact-item h4 {
        font-size: 1.1rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        width: 100%;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
        max-height: 85vh;
        margin: 1rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }

    .modal-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }

    .modal-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .modal-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }

    .modal-details h4 {
        font-size: 1.1rem;
        margin-bottom: 0.875rem;
    }

    .modal-details li {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }

    .footer {
        padding: 1.5rem 0;
    }

    .footer p {
        font-size: 0.85rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo-text {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .language-selector {
        right: 0.75rem;
        top: 0.75rem;
        max-width: calc(100vw - 70px);
        /* Hamburger menu üçün yer burax */
    }

    .lang-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.7rem;
        min-width: 35px;
    }

    .hero-content {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

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

    .cta-button {
        padding: 0.75rem 1.75rem;
        font-size: 0.9rem;
        width: 90%;
        max-width: 300px;
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.75rem;
        letter-spacing: 1px;
    }

    .section-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .services-section {
        padding: 50px 0;
    }

    .service-card {
        padding: 1.75rem 1.25rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

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

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

    .about-section {
        padding: 50px 0;
    }

    .about-text {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .about-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .contact-section {
        padding: 50px 0;
    }

    .contact-content {
        gap: 2rem;
    }

    .contact-icon {
        font-size: 1.3rem;
        min-width: 35px;
    }

    .contact-item h4 {
        font-size: 1rem;
    }

    .contact-item a,
    .contact-item p {
        font-size: 0.9rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1.5rem 1.25rem;
        width: 98%;
        max-height: 90vh;
        margin: 0.5rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.75rem;
        width: 32px;
        height: 32px;
    }

    .modal-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }

    .modal-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }

    .modal-description {
        font-size: 0.95rem;
    }

    .modal-details h4 {
        font-size: 1rem;
    }

    .modal-details li {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }

    .footer {
        padding: 1.25rem 0;
    }

    .footer p {
        font-size: 0.8rem;
    }
}

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

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

    .service-card {
        padding: 1.5rem 1rem;
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 0;
}

.social-links a svg {
    width: 22px;
    height: 22px;
    display: block;
}

.social-links a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}