/* style.css - Final Perfect Font (Khmer & English) & Buttons Edition */

/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@300;400;600;700&family=Outfit:wght@300;500;700;900&display=swap');

:root {
    /* PRIMARY: Sky Blue to Cyan Gradient */
    --primary: #38bdf8;      
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    --primary-dim: rgba(56, 189, 248, 0.15);
    
    /* SECONDARY: Royal Blue */
    --secondary: #60a5fa;    
    
    /* ACCENT: Pink */
    --accent: #f472b6;       

    /* BACKGROUND: Lighter Navy */
    --bg-dark: #1e293b; 
    
    /* GLASS EFFECT */
    --glass-bg: rgba(30, 41, 59, 0.7); 
    --glass-border: rgba(255, 255, 255, 0.15);
    
    /* TEXT */
    --text-main: #f8fafc;    
    --text-muted: #94a3b8;   
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 80px; 
}

body {
    /* កំណត់ Kantumruy Pro ជា Font គោលសម្រាប់ទាំងខ្មែរ និងអង់គ្លេស */
    font-family: 'Kantumruy Pro', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --- 2. BACKGROUND ANIMATION --- */
.background-animation {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 50% 0%, #334155 0%, #0f172a 100%);
}
.background-animation::before {
    content: ''; position: absolute; top: -15%; left: 15%; width: 70%; height: 60%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 60%);
    filter: blur(90px); animation: pulseLight 8s infinite alternate;
}
@keyframes pulseLight { 0% { opacity: 0.7; } 100% { opacity: 1; } }

/* --- 3. NAVBAR --- */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%;
    position: fixed; width: 100%; top: 0;
    background: rgba(15, 23, 42, 0.85); 
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}
.logo { 
    font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 800; 
    letter-spacing: 1.5px; color: white; text-transform: uppercase;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}
.logo span { color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 25px; }
.nav-links { display: flex; gap: 25px; }
.nav-links a {
    color: #cbd5e1; text-decoration: none; font-size: 0.95rem; font-weight: 500;
    transition: 0.3s; position: relative; letter-spacing: 0.5px;
    
    /* ដាក់ Kantumruy Pro ឱ្យ Menu */
    font-family: 'Outfit', 'Kantumruy Pro', sans-serif;
}
.nav-links a:hover { color: var(--primary); text-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0;
    background: var(--primary); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

/* Language Switcher */
.lang-switch { position: relative; }
.lang-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: white; padding: 8px 16px; border-radius: 50px;
    font-size: 0.85rem; display: flex; align-items: center; gap: 10px;
    transition: 0.3s; cursor: pointer; 
    font-family: 'Outfit', 'Kantumruy Pro', sans-serif;
    font-weight: 600;
}
.lang-btn:hover { border-color: var(--primary); background: rgba(56, 189, 248, 0.1); box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); }
.lang-btn img {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
}
.lang-dropdown {
    position: absolute; top: 140%; right: 0; width: 150px;
    background: #1e293b; border: 1px solid var(--glass-border);
    border-radius: 12px; overflow: hidden; display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1002;
}
.lang-dropdown.show { display: block; animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.lang-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px;
    color: #f1f5f9; cursor: pointer; transition: 0.2s; font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lang-item:hover { background: var(--primary-dim); color: var(--primary); padding-left: 20px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- 4. HERO SECTION --- */
.hero {
    min-height: 90vh; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; 
    padding: 120px 20px 60px; 
    position: relative;
}
.hero-tag {
    padding: 8px 25px; border-radius: 50px; 
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3); color: #bae6fd;
    font-size: 0.8rem; font-weight: 700; margin-bottom: 25px;
    letter-spacing: 2px; text-transform: uppercase;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(5px);
    
    /* === កែសម្រួលកន្លែងនេះ៖ ដាក់ Kantumruy Pro ចូល === */
    font-family: 'Outfit', 'Kantumruy Pro', sans-serif;
}

/* KHMER NAME */
.hero h1 {
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -1px;
    
    background: linear-gradient(
        to right, 
        #ffffff 0%, 
        var(--primary) 20%, 
        #ff00cc 40%, 
        #a855f7 60%, 
        var(--primary) 80%, 
        #ffffff 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    animation: shineText 4s linear infinite;
    text-shadow: 0 10px 30px rgba(0,0,0,0.2); 
}

/* ENGLISH NAME */
.hero h2 {
    font-family: 'Outfit', sans-serif; font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800; margin-bottom: 30px; letter-spacing: 1px;
    
    background: linear-gradient(
        to right, 
        #ffffff 0%, 
        var(--primary) 20%, 
        #ff00cc 40%, 
        #a855f7 60%, 
        var(--primary) 80%, 
        #ffffff 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    animation: shineText 4s linear infinite;
}

.hero-text-animate {
    font-size: 1.15rem; 
    max-width: 700px; 
    margin: 0 auto 40px; line-height: 1.8;
    font-weight: 400; color: #cbd5e1;
}

@keyframes shineText {
    to { background-position: 200% center; }
}

/* --- BUTTONS --- */
.btn-group { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
    padding: 14px 40px; border-radius: 50px; font-weight: 700; text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; align-items: center; gap: 12px; font-size: 1rem;
    position: relative; overflow: hidden; letter-spacing: 0.5px;
    
    /* ដាក់ Kantumruy Pro ឱ្យប៊ូតុង */
    font-family: 'Outfit', 'Kantumruy Pro', sans-serif; 
}

.btn-primary { 
    background: var(--primary-gradient); 
    color: white; 
    border: none;
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.5); 
}
.btn-primary:hover { 
    transform: translateY(-4px) scale(1.02); 
    box-shadow: 0 20px 35px -5px rgba(56, 189, 248, 0.6); 
}
.btn-primary:active { transform: translateY(-1px); }

.btn-outline { 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.2); 
    color: white; 
    backdrop-filter: blur(5px);
}
.btn-outline:hover { 
    border-color: var(--primary); 
    color: var(--primary); 
    background: rgba(56, 189, 248, 0.1); 
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- 5. FEATURES & SECTIONS --- */
.features-section { padding-top: 0; margin-top: -40px; position: relative; z-index: 10; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.feature-box, .service-card, .project-card, .contact-item {
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border);
    border-radius: 20px; transition: all 0.4s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.feature-box { padding: 40px 30px; }
.feature-box:hover { 
    border-color: var(--primary); 
    transform: translateY(-10px); 
    background: rgba(30, 41, 59, 0.9); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.feature-icon { 
    font-size: 2rem; color: var(--primary); margin-bottom: 20px; 
    background: rgba(56, 189, 248, 0.1); width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.feature-box h3 { color: white; font-size: 1.3rem; margin-bottom: 15px; font-weight: 700; }
.feature-box p { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }

.section-container { padding: 100px 5%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 70px; }
.section-title h2 { 
    font-size: 2.5rem; color: white; margin-bottom: 10px; font-weight: 700; 
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.section-title span { 
    font-family: 'Outfit', sans-serif; color: var(--primary); 
    font-size: 0.9rem; letter-spacing: 4px; text-transform: uppercase; font-weight: 800;
}

/* --- 6. PROFILE CARD --- */
.profile-card {
    position: relative; z-index: 1; overflow: hidden;
    padding: 2px; border-radius: 30px;
    background: transparent;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.profile-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--primary), var(--secondary), var(--accent), var(--primary));
    animation: rotateBorder 4s linear infinite; z-index: -2;
}
.profile-card-inner {
    background: #1e293b; border-radius: 28px; padding: 60px;
    display: flex; align-items: center; gap: 60px;
    height: 100%; position: relative; z-index: 1;
}
@keyframes rotateBorder { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.profile-img-container { width: 260px; height: 260px; flex-shrink: 0; position: relative; }
.profile-img {
    width: 100%; height: 100%; border-radius: 50%; border: 5px solid rgba(255,255,255,0.05);
    overflow: hidden; position: relative; z-index: 2;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}
.profile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.profile-card:hover .profile-img img { transform: scale(1.1); }

.profile-info h3 { font-size: 2rem; color: white; margin-bottom: 20px; font-weight: 700; }
.profile-info p { color: #d1d5db; margin-bottom: 18px; font-size: 1.05rem; line-height: 1.8; }
.highlight-text { color: var(--primary); font-weight: 700; position: relative; display: inline-block; }
.highlight-text::after {
    content: ''; position: absolute; width: 100%; height: 8px; bottom: 2px; left: 0;
    background: rgba(56, 189, 248, 0.2); z-index: -1;
}

/* --- 7. SERVICES & PORTFOLIO --- */
.services-grid, .portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.service-card { padding: 40px 30px; position: relative; overflow: hidden; }
.service-card:hover { transform: translateY(-10px); border-color: var(--secondary); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transform: scaleX(0); transform-origin: left; transition: 0.4s;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon { font-size: 2.8rem; margin-bottom: 25px; color: var(--secondary); transition: 0.3s; }
.service-card:hover .service-icon { transform: scale(1.1); color: var(--primary); }
.service-card h4 { font-size: 1.4rem; color: white; margin-bottom: 12px; font-weight: 700; }
.service-card p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }

/* --- PORTFOLIO & SLIDESHOW STYLES --- */
.project-card { overflow: hidden; border-radius: 20px; }
.project-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.project-img { 
    height: 250px; 
    width: 100%; 
    overflow: hidden; 
    background-color: #0f172a; 
    position: relative;
}

/* LIMS: HORIZONTAL SLIDESHOW */
.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #0f172a;
    border-bottom: 2px solid rgba(56, 189, 248, 0.1);
}

.slides-wrapper {
    display: flex;
    width: 900%; 
    height: 100%;
    animation: slidePushSmooth 32s ease-in-out infinite;
}

.slide-img {
    width: calc(100% / 9);
    height: 100%;
    object-fit: contain; 
    object-position: center;
    background-color: #1e293b;
    transition: 0.5s;
}

@keyframes slidePushSmooth {
    0%, 10%   { transform: translateX(0); }             
    12.5%, 22.5% { transform: translateX(-11.11%); }   
    25%, 35%     { transform: translateX(-22.22%); }   
    37.5%, 47.5% { transform: translateX(-33.33%); }   
    50%, 60%     { transform: translateX(-44.44%); }   
    62.5%, 72.5% { transform: translateX(-55.55%); }   
    75%, 85%     { transform: translateX(-66.66%); }   
    87.5%, 97.5% { transform: translateX(-77.77%); }   
    100%         { transform: translateX(-88.88%); }   
}

/* WEB DESIGN: VERTICAL SCROLL */
.slides-wrapper-vertical {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 700%; 
    animation: slideUpSmooth 24s ease-in-out infinite;
}

.slide-img-vertical {
    width: 100%;
    height: calc(100% / 7); 
    object-fit: cover;      
    object-position: top;   
    background-color: #1e293b;
}

@keyframes slideUpSmooth {
    0%, 12%      { transform: translateY(0); }             
    16.6%, 28.6% { transform: translateY(-14.28%); }       
    33.3%, 45.3% { transform: translateY(-28.57%); }       
    50%, 62%     { transform: translateY(-42.85%); }       
    66.6%, 78.6% { transform: translateY(-57.14%); }       
    83.3%, 95.3% { transform: translateY(-71.42%); }       
    100%         { transform: translateY(-85.71%); }       
}

/* OVERLAY TEXT STYLES */
.project-overlay-text {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.85);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(5px);
    z-index: 10;
    text-transform: uppercase;
}

.overlay-pink {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(244, 114, 182, 0.3);
}

.slideshow-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 40%);
    pointer-events: none;
}

.project-info { padding: 30px; }
.project-info h4 { color: white; font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.project-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* --- 8. CONTACT & FOOTER --- */
.contact-grid { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.contact-item {
    padding: 20px 35px; display: flex; align-items: center; gap: 20px;
    color: white; text-decoration: none; min-width: 280px;
}
.contact-item:hover { 
    border-color: var(--primary); 
    transform: translateY(-5px); 
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.contact-item i { font-size: 1.5rem; transition: 0.3s; }
.contact-item:hover i { transform: scale(1.2); }

footer { 
    position: relative;
    background-color: #0f172a;
    padding: 80px 20px 30px; 
    border-top: 1px solid var(--glass-border); 
    margin-top: 100px;
    overflow: hidden;
}

/* === ORIGINAL COLOR ANGKOR WAT (BRIGHT) === */
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('image/angkorwat.jpg'); 
    background-size: cover;       
    background-position: center center; 
    opacity: 0.5; 
    filter: brightness(1.1) contrast(1.1); 
    z-index: 0;
}

footer::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.4));
    z-index: 0;
}

.footer-content, .footer-bottom { position: relative; z-index: 1; }
.footer-content {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 50px;
    max-width: 1200px; margin: 0 auto; padding-bottom: 50px;
}
.footer-brand { flex: 2; min-width: 280px; }
.footer-brand h3 { 
    color: white; margin-bottom: 20px; font-family: 'Outfit', sans-serif; 
    letter-spacing: 2px; font-size: 1.5rem;
}
.footer-brand p { color: #cbd5e1; line-height: 1.7; font-size: 1rem; }

.footer-links, .footer-social { flex: 1; min-width: 180px; }
.footer-links h4, .footer-social h4 { 
    color: white; margin-bottom: 25px; font-size: 1.2rem; font-weight: 700;
}
.footer-links a { 
    display: block; color: #94a3b8; margin-bottom: 12px; 
    text-decoration: none; transition: 0.3s; font-size: 0.95rem;
    
    /* ដាក់ Kantumruy Pro ឱ្យ Link នៅ Footer */
    font-family: 'Outfit', 'Kantumruy Pro', sans-serif;
}
.footer-links a:hover { color: var(--primary); padding-left: 8px; text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }

.social-icons { display: flex; gap: 15px; }
.social-icons a { 
    width: 45px; height: 45px; background: rgba(255,255,255,0.1); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: white; transition: 0.3s;
    font-size: 1.1rem; border: 1px solid transparent;
}
.social-icons a:hover { 
    background: var(--primary); color: white; 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
    border-color: white;
}
.footer-bottom { 
    border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 25px; 
    font-size: 0.9rem; text-align: center; color: #64748b;
}

/* --- 9. CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 5px; border: 2px solid var(--bg-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
::selection { background: var(--primary); color: #fff; }

/* --- 10. RESPONSIVE --- */
.reveal-active { opacity: 1 !important; transform: translateY(0) !important; }
.scroll-reveal { opacity: 0; transform: translateY(40px); transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); }

@media (max-width: 900px) { 
    .profile-card-inner { flex-direction: column; text-align: center; padding: 50px 25px; gap: 30px; }
    .features-section { margin-top: 0; }
    .hero { min-height: auto; padding-top: 140px; padding-bottom: 80px; }
}
@media (max-width: 768px) {
    nav { flex-direction: column; padding: 15px; gap: 20px; }
    .nav-right { flex-direction: column; width: 100%; gap: 20px; }
    .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .hero h1 { font-size: 2.8rem; }
    .lang-dropdown { top: 110%; right: 50%; transform: translateX(50%); text-align: center; }
}