/* =========================================================================
   TOLAK STUDIO - Premium Landing Page Styles
   ========================================================================= */

:root {
    /* Color Palette */
    --bg-dark: #070709;
    --bg-card: #0d0d10;
    --bg-card-hover: rgba(21, 21, 26, 0.9);
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #996515;
    --text-main: #f0f0f0;
    --text-muted: #888890;

    /* Gradients */
    --gold-gradient: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    --gold-gradient-text: linear-gradient(to right, #e6c875, #b8860b, #e6c875);
    --bg-gradient: radial-gradient(circle at top right, #1a1a24 0%, var(--bg-dark) 40%);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-brush: 'Permanent Marker', cursive;
    /* To emulate the brush strokes from the design */

    /* Layout */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    word-wrap: break-word;
    /* Prevent long strings from bursting layout */
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-logo span {
    font-weight: 300;
    font-style: italic;
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
    margin-left: 5px;
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    background: var(--gold-gradient);
    border-radius: 4px;
    animation: load 2s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

@keyframes load {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ================= Navbar ================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 1000;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(7, 7, 9, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 60px;
    object-fit: contain;
}

/* Flawless Text Logo */
.text-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-decoration: none;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-logo span {
    font-weight: 300;
    font-style: italic;
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
    margin-left: 5px;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gold-gradient);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ================= Language Switcher ================= */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
}

.mobile-lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-family: var(--font-main);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--gold-primary);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* ================= Hero Section ================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2670&auto=format&fit=crop') center/cover no-repeat;
    opacity: 0.1;
    /* Subtle texture */
    z-index: 0;
    mix-blend-mode: overlay;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Typography Brush Effect */
.hero-title {
    font-family: var(--font-brush);
    font-size: 5rem;
    line-height: 1.1;
    text-transform: uppercase;
    background: var(--gold-gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    transform: rotate(-2deg);
    /* Slightly skewed for brush effect */
    animation: goldShine 5s linear infinite;
    text-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

@keyframes goldShine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 80%;
    font-weight: 300;
}

/* Button with Brush Texture */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    /* Adding clipping path to simulate a brush stroke button */
    clip-path: polygon(5% 0%, 100% 5%, 95% 100%, 0% 95%);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(212, 175, 55, 0.4);
}

/* Hero Visual - Code/Globe abstract */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-globe {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    animation: slowlyRotate 20s linear infinite;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.05), inset 0 0 50px rgba(212, 175, 55, 0.05);
}

.abstract-globe::before,
.abstract-globe::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(212, 175, 55, 0.3);
}

.abstract-globe::before {
    width: 300px;
    height: 300px;
    animation: rotateReverse 15s linear infinite;
}

.abstract-globe::after {
    width: 200px;
    height: 200px;
    border: 1px dotted rgba(212, 175, 55, 0.4);
}

.code-snippet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    width: 120%;
}

.code-snippet pre {
    color: var(--gold-light);
    font-size: 0.9rem;
    font-family: monospace;
}

@keyframes slowlyRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotateReverse {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* ================= Expertise Section ================= */
.expertise {
    padding: 8rem 0;
    position: relative;
    background: #0a0a0c;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 5rem;
}

.section-title span {
    font-family: var(--font-brush);
    color: var(--gold-primary);
    font-weight: normal;
    font-size: 3rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Card Styling */
.expertise-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
    transform-origin: center;
}

.expertise-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.4);
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--gold-primary);
}

/* Abstract brush behind icon */
.icon-wrapper .brush-stroke {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 0;
    transition: all var(--transition-smooth);
}

.icon-wrapper i {
    z-index: 1;
}

.expertise-card:hover .brush-stroke {
    transform: rotate(45deg) scale(1.2);
    background: rgba(212, 175, 55, 0.2);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
}

.expertise-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.expertise-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ================= Portfolio Section ================= */
.portfolio {
    padding: 8rem 0;
    background: var(--bg-dark);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.portfolio-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.slider-controls {
    display: flex;
    gap: 1rem;
}

.slider-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-btn:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
}

.portfolio-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-card {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(to top, rgba(212, 175, 55, 0.9) 0%, rgba(212, 175, 55, 0) 100%);
    transform: translateY(20px);
    opacity: 0.8;
    transition: all var(--transition-smooth);
}

.portfolio-overlay h3 {
    color: var(--bg-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-card:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Coming Soon Badge & CTA */
.portfolio-badge-coming {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gold-gradient);
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6); }
}

.portfolio-cta-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 20px;
    background: #25D366;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 20px;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.portfolio-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
    background: #1fb855;
}

.portfolio-cta-btn i {
    margin-right: 6px;
}

/* ================= Sub-Page Shared Styles ================= */
.page-header {
    padding: 12rem 0 6rem;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2670&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 7, 9, 0.85);
    /* Dark overlay */
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.page-title span {
    font-family: var(--font-brush);
    color: var(--gold-primary);
    font-weight: normal;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ================= About Page ================= */
.about-content {
    padding: 8rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--gold-primary);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-box {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ================= Services Page ================= */
.services-detail {
    padding: 8rem 0;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 8rem;
    align-items: center;
}

.service-row.reverse {
    direction: rtl;
}

.service-row.reverse>* {
    direction: ltr;
}

.service-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-info h2 i {
    color: var(--gold-primary);
}

.service-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--gold-primary);
}

.service-img {
    height: 400px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ================= Contact Page ================= */
.contact-page-sec {
    padding: 8rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.contact-form-wrapper h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.premium-form .input-group {
    margin-bottom: 1.5rem;
}

.premium-form input,
.premium-form textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.premium-form input:focus,
.premium-form textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-box {
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
}

.detail-box i {
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
}

.detail-box h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.detail-box p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ================= Portfolio Page ================= */
.portfolio-page-sec {
    padding: 8rem 0;
}

.portfolio-grid-full {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.portfolio-grid-full .portfolio-card {
    height: 450px;
}

.portfolio-grid-full .portfolio-overlay p {
    color: var(--text-main);
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* ================= Footer =================*/
/* --- Footer --- */
.footer {
    background: #0a0a0c;
    padding: 6rem 0 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-left {
    max-width: 300px;
}

.footer-middle,
.footer-right {
    min-width: 250px;
}

.footer-logo {
    height: 70px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.footer-text-logo {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.contact-info i {
    color: var(--gold-primary);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* ================= Mobile Navigation Overlay ================= */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.mobile-menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--gold-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(7, 7, 9, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transform: translateY(50px);
    transition: all 0.5s ease-in-out;
}

.mobile-nav-overlay.active .mobile-nav-links {
    transform: translateY(0);
}

.mobile-nav-links a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--gold-primary);
}

body.no-scroll {
    overflow: hidden;
}

/* ================= Responsive Design ================= */
@media (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-slider {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .navbar .lang-switch {
        display: none;
        /* Hide top language switcher on mobile */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
        /* Further reduced from 3.5rem for better fit */
        margin-bottom: 1.5rem;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        max-width: 100%;
        margin: 0 auto 2rem;
    }

    .hero-visual {
        height: 300px;
    }

    .abstract-globe,
    .abstract-globe::before,
    .abstract-globe::after {
        width: 100%;
        height: 100%;
        max-width: 250px;
        max-height: 250px;
    }

    .code-snippet {
        width: 90%;
        padding: 1rem;
    }

    .code-snippet pre {
        font-size: 0.75rem;
        white-space: pre-wrap;
        word-break: break-all;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-slider {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-left,
    .footer-middle,
    .footer-right {
        min-width: 100%;
        max-width: 100%;
    }

    /* Sub-pages Responsive */
    .page-title {
        font-size: 2.5rem;
        /* Reduced to fix line breaks */
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-box {
        padding: 1.5rem !important;
    }

    .stat-box h3 {
        font-size: 2.5rem !important;
    }

    .service-row.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
        /* Reset reverse direction on mobile */
    }

    .service-img {
        height: 250px;
    }

    .portfolio-grid-full {
        grid-template-columns: 1fr;
    }

    .portfolio-grid-full .portfolio-card {
        height: 300px;
    }
}

/* ==========================================================================
   Countdown Modal Styles
   ========================================================================== */
.countdown-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.countdown-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.countdown-modal-content {
    background: rgba(20, 20, 24, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 650px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.countdown-modal-overlay.active .countdown-modal-content {
    transform: translateY(0);
}

.countdown-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.countdown-close-btn:hover {
    color: var(--gold-primary);
}

/* iframe responsive wrapper */
.countdown-media-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.countdown-media-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 300px;
}

@media (max-width: 768px) {
    .countdown-modal-content {
        padding: 2.5rem 1rem 1.5rem;
    }

    .countdown-wrapper .cd-box span {
        font-size: 2rem !important;
    }

    .countdown-wrapper .cd-sep {
        font-size: 1.5rem !important;
    }
}

/* ==========================================================================
   Legal Pages Styles
   ========================================================================== */
.legal-content {
    padding: 6rem 0;
    background: var(--bg-main);
}

.legal-text {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.legal-text h2 {
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.legal-text h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.legal-text p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Cookie Banner Styles
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 800px;
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.1);
    z-index: 99999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.cookie-icon {
    font-size: 2.5rem;
    color: var(--gold-primary);
}

.cookie-text h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.5rem;
        bottom: 15px;
    }

    .cookie-actions {
        width: 100%;
        text-align: center;
    }

    .cookie-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.floating-wa {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: waPulse 2s infinite;
}

@keyframes waPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-wa:hover {
    transform: translateY(-3px) scale(1.1);
    background-color: #20b858;
    color: #fff;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    animation: none;
}

@media (max-width: 768px) {
    .floating-wa {
        bottom: 85px;
        right: 18px;
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   AI Chatbot Widget
   ========================================================================== */
.chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    font-family: var(--font-main);
}

/* Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.chatbot-toggle-icon {
    color: var(--bg-dark);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    animation: badgeBounce 0.5s ease;
}

@keyframes badgeBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: rgba(15, 15, 20, 0.97);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    font-size: 1.1rem;
    position: relative;
    flex-shrink: 0;
}

.chatbot-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #25d366;
    border-radius: 50%;
    border: 2px solid rgba(15, 15, 20, 0.97);
}

.chatbot-header h4 {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.chatbot-status {
    color: #25d366;
    font-size: 0.75rem;
    font-weight: 500;
}

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-wa-link {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chatbot-wa-link:hover {
    background: rgba(37, 211, 102, 0.3);
    transform: scale(1.1);
}

.chatbot-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 280px;
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
}

/* Message Bubbles */
.chatbot-msg {
    display: flex;
}

.chatbot-msg.user {
    justify-content: flex-end;
}

.chatbot-msg.bot {
    justify-content: flex-start;
}

.chatbot-msg-bubble {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

.chatbot-msg.user .chatbot-msg-bubble {
    flex-direction: row-reverse;
}

.chatbot-msg-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    font-size: 0.7rem;
    margin-top: 2px;
}

.chatbot-msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatbot-msg-text {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-msg.bot .chatbot-msg-text {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.chatbot-msg.user .chatbot-msg-text {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.15));
    color: var(--text-main);
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.chatbot-msg-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
    padding: 0 6px;
}

.chatbot-msg.user .chatbot-msg-time {
    text-align: right;
}

/* Typing Indicator */
.chatbot-typing-dots {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.chatbot-typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out both;
}

.chatbot-typing-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.chatbot-typing-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes typingDot {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Actions */
.chatbot-quick-actions {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.chatbot-quick-btn {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold-secondary);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
    transform: translateY(-1px);
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.3);
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 10px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.chatbot-input:focus {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.chatbot-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 50px);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-toggle {
        width: 54px;
        height: 54px;
    }

    .chatbot-toggle-icon {
        font-size: 1.3rem;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        max-height: 70vh;
        bottom: 70px;
        right: 0;
    }
}