/* ==========================================
   Mingalar Mon - Custom Styles
   Using Montserrat Font Family
   ========================================== */

/* Tailwind Configuration Override */
@layer base {
    :root {
        /* Light mode (default) */
        --background: 40 30% 97%;
        --foreground: 220 20% 15%;
        --card: 0 0% 100%;
        --card-foreground: 220 20% 15%;
        --primary: 42 65% 45%;
        --primary-foreground: 0 0% 100%;
        --secondary: 220 15% 92%;
        --secondary-foreground: 220 20% 15%;
        --muted: 220 15% 90%;
        --muted-foreground: 220 10% 45%;
        --border: 220 15% 85%;
        --gold: 42 65% 45%;
        --gold-light: 42 60% 60%;
        --gold-dark: 42 70% 35%;
        --champagne: 40 35% 65%;
        --navy: 220 30% 25%;
        --charcoal: 220 20% 95%;
    }

    .dark {
        --background: 220 20% 6%;
        --foreground: 45 20% 95%;
        --card: 220 18% 10%;
        --card-foreground: 45 20% 95%;
        --primary: 42 65% 55%;
        --primary-foreground: 220 20% 6%;
        --secondary: 220 15% 15%;
        --secondary-foreground: 45 20% 95%;
        --muted: 220 15% 18%;
        --muted-foreground: 220 10% 60%;
        --border: 220 15% 20%;
        --gold: 42 65% 55%;
        --gold-light: 42 60% 70%;
        --gold-dark: 42 70% 40%;
        --champagne: 40 35% 75%;
        --navy: 220 30% 12%;
        --charcoal: 220 20% 8%;
    }
}

/* ==========================================
   Base Styles with Montserrat Font
   ========================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Headings use Montserrat with appropriate weights */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* ==========================================
   Theme Toggle & Logo Visibility
   ========================================== */

.logo-light,
.theme-icon-dark {
    display: block;
}

.logo-dark,
.theme-icon-light {
    display: none;
}

.dark .logo-light,
.dark .theme-icon-dark {
    display: none;
}

.dark .logo-dark,
.dark .theme-icon-light {
    display: block;
}

.logo-text {
    color: #000;
    transition: color 0.3s ease;
}

.dark .logo-text {
    color: #fff;
}

/* ==========================================
   Navigation Styles
   ========================================== */

#navbar {
    backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(194, 154, 84, 0.2);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.dark #navbar.scrolled {
    background: rgba(20, 20, 30, 0.7);
    border-bottom: 1px solid rgba(194, 154, 84, 0.1);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

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

.mobile-nav-link {
    color: hsl(var(--foreground) / 0.8);
    transition: color 0.3s ease;
}

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

/* ==========================================
   Background Styles
   ========================================== */

/* Hero Background with Image */
/* Hero Section Mobile Fix */
.hero-section {
    padding-top: 120px;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 0;
    }
}

.hero-bg-image {
    background-image: url('../assets/hero-light.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25 !important;
    z-index: 0;
    pointer-events: none;
}

.dark .hero-bg-image {
    background-image: url('../assets/hero-dark.png');
    opacity: 0.50 !important;
}

.hero-bg-gradient {
    background: linear-gradient(
        to bottom right,
        hsla(40, 30%, 97%, 0.70) 0%,
        hsla(220, 15%, 92%, 0.60) 30%,
        hsla(40, 30%, 97%, 0.70) 60%,
        hsla(220, 15%, 92%, 0.60) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.dark .hero-bg-gradient {
    background: linear-gradient(
        to bottom right,
        hsla(220, 20%, 6%, 0.70) 0%,
        hsla(220, 30%, 12%, 0.60) 30%,
        hsla(220, 20%, 8%, 0.70) 60%,
        hsla(220, 30%, 12%, 0.60) 100%
    );
}

/* Particles Container */
#particles-js {
    z-index: 2;
}

.section-bg {
    background: linear-gradient(to bottom,
        hsl(40, 30%, 97%) 0%,
        hsl(220, 15%, 92%) 30%,
        hsl(40, 30%, 97%) 100%
    );
}

.dark .section-bg {
    background: linear-gradient(to bottom,
        hsl(220, 20%, 6%) 0%,
        hsl(220, 30%, 12%) 50%,
        hsl(220, 20%, 6%) 100%
    );
}

.grid-overlay {
    background-image: 
        linear-gradient(rgba(194, 154, 84, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(194, 154, 84, 0.05) 1px, transparent 1px);
    background-size: 100px 100px;
}

.dark .grid-overlay {
    background-image:
        linear-gradient(rgba(194, 154, 84, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(194, 154, 84, 0.03) 1px, transparent 1px);
}

/* ==========================================
   Glassmorphism Effects
   ========================================== */

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(220, 220, 230, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dark .glass-panel {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(60, 60, 80, 0.3);
}

.glass-panel-light {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 220, 230, 0.2);
}

.dark .glass-panel-light {
    background: rgba(20, 20, 30, 0.3);
    border: 1px solid rgba(60, 60, 80, 0.2);
}

/* ==========================================
   Gradient Effects
   ========================================== */

.gradient-gold {
    background: linear-gradient(135deg, 
        hsl(42, 65%, 45%) 0%, 
        hsl(40, 35%, 65%) 100%
    );
}

.gradient-text-gold {
    background: linear-gradient(135deg,
        hsl(42, 65%, 55%) 0%,
        hsl(40, 35%, 75%) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        hsla(42, 65%, 45%, 0.5),
        hsla(42, 65%, 45%, 0.1),
        hsla(42, 65%, 45%, 0.3)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ==========================================
   Glow Effects
   ========================================== */

.glow-gold {
    box-shadow: 
        0 0 40px hsla(42, 65%, 45%, 0.2),
        0 0 80px hsla(42, 65%, 45%, 0.1);
}

.text-glow {
    text-shadow: 0 0 30px hsla(42, 65%, 55%, 0.5);
}

/* ==========================================
   Color Utilities
   ========================================== */

.text-primary {
    color: hsl(var(--primary));
}

.text-foreground {
    color: hsl(var(--foreground));
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.bg-background {
    background-color: hsl(var(--background));
}

.bg-secondary\/50 {
    background-color: hsl(var(--secondary) / 0.5);
}

.bg-card\/60 {
    background-color: hsl(var(--card) / 0.6);
}

.bg-card\/80 {
    background-color: hsl(var(--card) / 0.8);
}

.bg-primary\/10 {
    background-color: hsl(var(--primary) / 0.1);
}

.bg-primary\/20 {
    background-color: hsl(var(--primary) / 0.2);
}

.bg-champagne\/10 {
    background-color: hsl(var(--champagne) / 0.1);
}

.text-champagne {
    color: hsl(var(--champagne));
}

.border-border\/50 {
    border-color: hsl(var(--border) / 0.5);
}

.border-primary\/50 {
    border-color: hsl(var(--primary) / 0.5);
}

.border-primary\/20 {
    border-color: hsl(var(--primary) / 0.2);
}

/* ==========================================
   Hero Text Animations
   ========================================== */

.hero-title {
    perspective: 1000px;
}

.hero-text-line-1,
.hero-text-line-2,
.hero-text-line-3 {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.hero-text-line-1 {
    animation-delay: 0.3s;
}

.hero-text-line-2 {
    animation-delay: 0.6s;
    animation-name: fadeInScale;
}

.hero-text-line-3 {
    animation-delay: 0.9s;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Subtle breathing animation for hero text */
.hero-text-line-2 {
    animation: fadeInScale 1s ease-out 0.6s forwards, breathe 4s ease-in-out 2s infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ==========================================
   Animations - Floating & Movement
   ========================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out infinite 2s;
}

.animate-float-slow {
    animation: float 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.4;
        filter: blur(40px);
    }
    50% {
        opacity: 0.7;
        filter: blur(60px);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* ==========================================
   Scroll Animations
   ========================================== */

.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================
   Scrollbar Styling
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
    background: hsla(42, 65%, 45%, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(42, 65%, 45%, 0.5);
}

/* ==========================================
   Responsive Typography
   ========================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   Custom Component Styles
   ========================================== */

/* Feature Cards */
.feature-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Product Cards */
.product-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mission & Vision Cards */
.mission-card,
.vision-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mission-card:hover,
.vision-card:hover {
    transform: translateY(-5px);
}

/* Value Items */
.value-item {
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: scale(1.05);
}

/* ==========================================
   Form Styles
   ========================================== */

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: hsl(var(--muted-foreground));
}

/* ==========================================
   Button Hover Effects
   ========================================== */

button,
a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover,
a.btn:hover {
    transform: translateY(-2px);
}

button:active,
a.btn:active {
    transform: translateY(0);
}

/* ==========================================
   Utility Classes
   ========================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* Hide elements */
.hidden {
    display: none;
}

/* Smooth transitions */
.transition-all {
    transition: all 0.3s ease;
}

/* ==========================================
   Dark Mode Specific Adjustments
   ========================================== */

.dark {
    color-scheme: dark;
}

.dark img {
    opacity: 0.95;
}

.dark .glass-panel,
.dark .glass-panel-light {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   Loading States
   ========================================== */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ==========================================
   Accessibility Improvements
   ========================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   Myanmar Font Support
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Myanmar:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Myanmar Language Font Stack */
body.lang-myanmar {
    font-family: 'Noto Serif Myanmar', 'Pyidaungsu', 'Myanmar Text', 'Padauk', serif;
    line-height: 2;
    font-weight: 100;
}

/* Hero Section - Smaller Titles for Myanmar */
body.lang-myanmar .hero-title {
    font-size: 1.5rem !important; /* 2.5x smaller than default 4xl */
}

@media (min-width: 768px) {
    body.lang-myanmar .hero-title {
        font-size: 2rem !important; /* 2.5x smaller than default 6xl */
    }
}

@media (min-width: 1024px) {
    body.lang-myanmar .hero-title {
        font-size: 2.5rem !important; /* 2.5x smaller than default 7xl */
    }
}

/* Myanmar Headings - Noto Serif Myanmar Regular 400 */
body.lang-myanmar h1,
body.lang-myanmar h2,
body.lang-myanmar h3,
body.lang-myanmar h4,
body.lang-myanmar h5,
body.lang-myanmar h6 {
    font-family: 'Noto Serif Myanmar', 'Pyidaungsu', 'Myanmar Text', 'Padauk', serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Paragraphs and Body Text - Thin 100 */
body.lang-myanmar p,
body.lang-myanmar .text-muted-foreground,
body.lang-myanmar span:not(.logo-text),
body.lang-myanmar div {
    font-weight: 100;
}

/* Button Text - Light 300 */
body.lang-myanmar button,
body.lang-myanmar .btn,
body.lang-myanmar a.px-6,
body.lang-myanmar a.px-8 {
    font-weight: 300;
}

/* Navigation - Light 300 */
body.lang-myanmar .nav-link,
body.lang-myanmar .mobile-nav-link {
    font-weight: 300;
}

/* Font Weight Classes for Myanmar */
body.lang-myanmar .font-light {
    font-weight: 200;
}

body.lang-myanmar .font-medium {
    font-weight: 300;
}

body.lang-myanmar .font-semibold {
    font-weight: 400;
}

body.lang-myanmar .font-bold {
    font-weight: 500;
}

body.lang-myanmar .font-extrabold {
    font-weight: 600;
}

/* Adjust letter spacing for Myanmar text */
body.lang-myanmar .tracking-widest,
body.lang-myanmar .tracking-wider {
    letter-spacing: 0.05em;
}

/* Special adjustments for specific elements */
body.lang-myanmar .hero-content p {
    font-weight: 100;
    line-height: 2.2;
}

body.lang-myanmar .glass-panel h3,
body.lang-myanmar .glass-panel h4 {
    font-weight: 400;
}

/* ==========================================
   Language Switcher Styles
   ========================================== */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.language-switcher:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(194, 154, 84, 0.3);
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lang-btn img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
    filter: grayscale(50%) opacity(0.7);
}

.lang-btn:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #C29A54 0%, #B08D4A 100%);
    box-shadow: 0 4px 12px rgba(194, 154, 84, 0.3);
}

.lang-btn.active img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.lang-btn:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

/* Language switcher for mobile */
@media (max-width: 768px) {
    .language-switcher {
        padding: 0.2rem;
    }
    
    .lang-btn {
        width: 32px;
        height: 32px;
    }
    
    .lang-btn img {
        width: 20px;
        height: 20px;
    }
}

/* Smooth transition for text changes */
[data-i18n] {
    transition: opacity 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
}

/* Enhanced transition for all translatable elements */
[data-i18n],
[data-i18n-placeholder],
body.lang-myanmar,
body.lang-myanmar * {
    transition: font-family 0.4s ease, font-size 0.4s ease, font-weight 0.4s ease, line-height 0.4s ease, letter-spacing 0.3s ease;
}

/* Fade and slide animation on language switch */
.language-switching [data-i18n] {
    animation: fadeSlide 0.5s ease-in-out;
}

@keyframes fadeSlide {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth body class transition */
body {
    transition: font-family 0.4s ease, line-height 0.4s ease;
}

/* Dark theme adjustments for language switcher */
html.dark .language-switcher {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .language-switcher:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(194, 154, 84, 0.4);
}

/* Keep logo text in original font regardless of language */
body.lang-myanmar .logo-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 300 !important;
    letter-spacing: 0.1em !important;
}
