/* Raleway font */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900;
  src: url('../external/fonts/Raleway/Raleway-VariableFont_wght.ttf') format('truetype');
  font-display: swap;
}

:root {
    --bg-color: #F4EFEA;
    --red-dark: #7D141D;
    --red-light: #FF1E27;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Raleway', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-padding-top: 100px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Allow the use of \n in translations */
[i18n-tr] {
  white-space: pre-line;
}

.container {
    width: min(90%, 1200px);
    margin-inline: auto;
    padding-inline: 20px;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--red-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(to right, var(--red-dark), var(--red-light));
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.language-selector {
    padding: 8px 12px;
    border: 0px;
    border-radius: 4px;
    background-color: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.0rem;
    visibility: hidden;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--red-dark), var(--red-light));
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.hero-text {
    grid-column: span 2;
    text-align: center;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Small animation */
@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content,
.services-panels {
    animation: fadeInLeft 1.5s ease forwards;
}

.services-panels {
    display: contents;
}

.service-panel {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 25px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-panel:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--white);
}

.service-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.service-panel p {
    opacity: 0.9;
}

/* Section Styling */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--red-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, var(--red-dark), var(--red-light));
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    margin: 0 auto;
}

/* Expertise Section */
#expertise {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

#expertise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--red-light) 50%,
        transparent 100%);
}

.section-title {
    margin-bottom: 40px;
}

.expertise-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.expertise-category {
    text-align: center;
    margin-bottom: -25px;
}

.expertise-category h3 {
    font-size: 1.4rem;
    color: var(--red-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expertise-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

.tech-item {
    background: var(--white);
    border-radius: 16px;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(125, 20, 29, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-dark), var(--red-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.tech-item:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(125, 20, 29, 0.15),
        0 4px 6px rgba(125, 20, 29, 0.05);
    border-color: rgba(125, 20, 29, 0.2);
}

.tech-item:hover::before {
    transform: scaleX(1);
}

.tech-header {
    display: flex;
    align-items: center;
    gap: 15px; /* spacing between logo & title */
    margin-bottom: 15px;
    width: 100%;
}

.tech-logo {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.tech-item:hover .tech-logo {
    transform: scale(1.1);
}

.tech-logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(255, 30, 39, 0.1) 0%,
        rgba(125, 20, 29, 0.05) 100%);
    border-radius: 50%;
    z-index: -1;
}

.tech-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.tech-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tech-bubble {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tech-header h4 {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--red-dark);
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.tech-bubble p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    text-align: justify;
    text-justify: inter-word;
}

.product-logos {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.product-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(244, 239, 234, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 70px;
}

.tech-item:hover .product-logo {
    background: rgba(125, 20, 29, 0.05);
}

.product-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.product-logo span {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

.product-logos.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.product-logo.wide {
    grid-column: span 2;
    padding: 10px 15px;
}

.product-logo.wide img {
    width: 50px;
    height: 40px;
}

/* Responsive Design - Mobile First */
@media (max-width: 1200px) {
    .expertise-row {
        gap: 20px;
    }

    .tech-item {
        padding: 20px 15px;
    }

    .tech-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .tech-bubble h4 {
        font-size: 1.1rem;
        min-height: 2.6em;
    }
}

@media (max-width: 992px) {
    .expertise-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .tech-item {
        min-height: 240px;
    }

    .tech-bubble h4 {
        min-height: auto;
        font-size: 1rem;
    }

    .tech-bubble p {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .expertise-grid {
        gap: 30px;
    }

    .expertise-row {
        gap: 15px;
    }

    .tech-item {
        min-height: 220px;
        padding: 15px 12px;
    }

    .tech-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }

    .product-logos.grid-2x2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .product-logo {
        padding: 6px 10px;
        min-width: 60px;
    }

    .product-logo.wide {
        grid-column: span 1;
    }

    .product-logo img {
        width: 25px;
        height: 25px;
    }

    .product-logo.wide img {
        width: 40px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    .expertise-row {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
        gap: 15px;
    }

    .tech-item {
        min-height: auto;
        padding: 0px;
        flex-direction: column;
        text-align: left;
        gap: 0px;
    }

    .tech-header {
        flex-direction: row;
        margin-bottom: 0;
        align-items: center;
        gap: 15px;
    }

    .tech-logo {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }

    .tech-bubble p {
        text-align: left;
        text-justify: auto;
    }

    .product-logos {
        justify-content: flex-start;
    }

    .product-logos.grid-2x2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-logo.wide {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .tech-item {
        padding: 15px;
        gap: 15px;
    }

    .tech-logo {
        width: 50px;
        height: 50px;
    }

    .product-logos {
        gap: 8px;
    }
}

/* Prevent text overflow */
.tech-bubble h4,
.tech-bubble p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    margin: 0;
}

/* Partners Section */
.partners-section {
    background-color: var(--white);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.partner-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-logo img {
    max-height: 100%;
    max-width: 100%;
}

/* Products Section */
.product-card {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 900px;
    margin: 0 auto;
}

.product-logo-large {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.product-logo-wrapper {
    position: relative;
    display: inline-block;
}

.product-logo-large img {
    display: block;
    max-width: 100%;
    height: auto;
}

.product-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, var(--red-dark), var(--red-light));
    color: var(--bg-color);
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 1px 1px 10px 1px;
}

.product-info {
    flex: 2;
    padding: 40px;
}

.product-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--red-dark);
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Contact Section */
.contact-section {
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
    margin-right: 50px;
    gap: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--red-dark), var(--red-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 5px;
    color: var(--red-dark);
}

.contact-social-network-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-social-network-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.contact-qr-code img {
    display: block;
    width: 125px;
    height: auto;
}

.contact-icon-wechat {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--red-dark), var(--red-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-wechat img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.email-link a,
.phone-number a {
    color: var(--red-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.email-link a:hover,
.phone-number a:hover {
  color: var(--red-light);
  text-decoration: underline;
}

.map-placeholder {
    position: relative;
    height: 400px;
    width: 100%;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 10px;
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 10px;
}

#map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#map-loading span {
    border-radius: 8px;
    padding: 0.3em 0.8em;
    background-color: rgba(244, 239, 234, 0.8);
    color: var(--red-light);
    font-weight: bold;
    font-size: 1.2em;
}

#map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        gap: 40px;
    }

    .hero-text, .services-panels {
        max-width: 100%;
    }

    .product-card {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .expertise-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 430px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px; /* avoid touching edges */
    }

    .hero-text, .services-panels {
        grid-column: auto;
    }
}
