/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Phetsarath Font Face */
@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.eot');
    src: url('./phetsarath_ot.eot?#iefix') format('embedded-opentype'),
         url('./phetsarath_ot.woff2') format('woff2'),
         url('./phetsarath_ot.woff') format('woff'),
         url('./phetsarath_ot.ttf') format('truetype'),
         url('./phetsarath_ot.svg#phetsarath_ot') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Additional font weights for Phetsarath */
@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Phetsarath';
    src: url('./phetsarath_ot.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Language selector in navbar */
.nav-language {
    position: relative;
}

.language-selector-nav {
    position: relative;
}

.language-btn-nav {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.language-btn-nav:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.language-btn-nav .language-flag {
    font-size: 14px;
}

.language-btn-nav .language-arrow {
    font-size: 8px;
    transition: transform 0.3s ease;
}

.language-selector-nav.active .language-arrow {
    transform: rotate(180deg);
}

.language-menu-nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 6px 0;
    min-width: 140px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    z-index: 1000;
}

.language-selector-nav.active .language-menu-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    color: #333;
}

.language-option-nav:hover {
    background: #f8f9fa;
}

.language-option-nav.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.language-option-nav .language-flag {
    font-size: 14px;
}

/* Font family for different languages */
body.font-lao {
    font-family: 'Phetsarath', 'Noto Sans Lao', sans-serif !important;
}

body.font-vietnamese {
    font-family: 'Noto Sans Vietnamese', 'Inter', sans-serif !important;
}

body.font-chinese {
    font-family: 'Noto Sans SC', 'Inter', sans-serif !important;
}

body.font-thai {
    font-family: 'Noto Sans Thai', 'Inter', sans-serif !important;
}

body.font-english {
    font-family: 'Inter', sans-serif !important;
}

body.font-default {
    font-family: 'Inter', sans-serif;
}

/* Ensure fonts render properly for each language */
.font-lao *,
body.font-lao h1,
body.font-lao h2,
body.font-lao h3,
body.font-lao h4,
body.font-lao h5,
body.font-lao h6,
body.font-lao p,
body.font-lao span,
body.font-lao div,
body.font-lao a,
body.font-lao button,
body.font-lao input,
body.font-lao textarea {
    font-family: 'Phetsarath', 'Noto Sans Lao', sans-serif !important;
}

.font-vietnamese *,
body.font-vietnamese h1,
body.font-vietnamese h2,
body.font-vietnamese h3,
body.font-vietnamese h4,
body.font-vietnamese h5,
body.font-vietnamese h6,
body.font-vietnamese p,
body.font-vietnamese span,
body.font-vietnamese div,
body.font-vietnamese a,
body.font-vietnamese button,
body.font-vietnamese input,
body.font-vietnamese textarea {
    font-family: 'Noto Sans Vietnamese', 'Inter', sans-serif !important;
}

.font-chinese *,
body.font-chinese h1,
body.font-chinese h2,
body.font-chinese h3,
body.font-chinese h4,
body.font-chinese h5,
body.font-chinese h6,
body.font-chinese p,
body.font-chinese span,
body.font-chinese div,
body.font-chinese a,
body.font-chinese button,
body.font-chinese input,
body.font-chinese textarea {
    font-family: 'Noto Sans SC', 'Inter', sans-serif !important;
}

.font-thai *,
body.font-thai h1,
body.font-thai h2,
body.font-thai h3,
body.font-thai h4,
body.font-thai h5,
body.font-thai h6,
body.font-thai p,
body.font-thai span,
body.font-thai div,
body.font-thai a,
body.font-thai button,
body.font-thai input,
body.font-thai textarea {
    font-family: 'Noto Sans Thai', 'Inter', sans-serif !important;
}

.font-english *,
body.font-english h1,
body.font-english h2,
body.font-english h3,
body.font-english h4,
body.font-english h5,
body.font-english h6,
body.font-english p,
body.font-english span,
body.font-english div,
body.font-english a,
body.font-english button,
body.font-english input,
body.font-english textarea {
    font-family: 'Inter', sans-serif !important;
}

/* Navbar scrolled state */
.navbar.scrolled .language-btn-nav {
    color: #333;
    border-color: rgba(0, 0, 0, 0.2);
}

.navbar.scrolled .language-btn-nav:hover {
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .language-btn-nav .language-text {
        display: none;
    }
    
    .language-btn-nav {
        padding: 4px 8px;
    }
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Force Phetsarath font for Lao language with higher specificity */
body.font-lao,
body.font-lao *,
body.font-lao h1,
body.font-lao h2,
body.font-lao h3,
body.font-lao h4,
body.font-lao h5,
body.font-lao h6,
body.font-lao p,
body.font-lao span,
body.font-lao div,
body.font-lao a,
body.font-lao button,
body.font-lao input,
body.font-lao textarea,
body.font-lao .nav-link,
body.font-lao .hero-title,
body.font-lao .hero-subtitle,
body.font-lao .hero-description,
body.font-lao .section-title,
body.font-lao .section-subtitle,
body.font-lao .about-card h3,
body.font-lao .about-card p,
body.font-lao .project-content h3,
body.font-lao .project-content p,
body.font-lao .contact-card h3,
body.font-lao .contact-card p,
body.font-lao .footer-info h3,
body.font-lao .footer-info p {
    font-family: 'Phetsarath', 'Poppins', sans-serif !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-primary:hover {
    background: transparent;
    border-color: white;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #3498db;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    display: grid;
    gap: 2rem;
}

.about-text {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.about-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.about-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.about-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.project-content p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Gallery Section */
.gallery {
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    opacity: 0.9;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.contact-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #2980b9;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Email Form Styling */
.email-form {
    width: 100%;
}

.email-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.email-form p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #adb5bd;
}

/* Form Messages */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Submit Button */
.email-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.email-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
}

.social-links i {
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-text {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    .about-card,
    .contact-card {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        margin: 0 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}