/* ============================================
   Curl-E Geophysics — Corporate Stylesheet
   Modern professional blue theme (PTTEP/SLB tier)
   ============================================ */

:root {
    --ceg-dark: #1A3A5C;
    --ceg-navy: #0F2744;
    --ceg-blue: #2B6CB0;
    --ceg-mid: #4A90C4;
    --ceg-light: #6BADE0;
    --ceg-pale: #B5D8F0;
    --ceg-accent: #8DC8F0;
    --ceg-bg: #F7FAFD;
    --ceg-bg-alt: #EDF4FB;
    --ceg-gray: #4A5568;
    --ceg-gray-light: #E2E8F0;
    --ceg-white: #FFFFFF;
    --ceg-text: #2D3748;
    --ceg-footer: #080F1A;
    --max-width: 1200px;
    --nav-height: 70px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --transition: 0.3s ease;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
    font-family: 'IBM Plex Sans', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ceg-text);
    line-height: 1.7;
    background: var(--ceg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Sans', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.3;
}

a { color: var(--ceg-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ceg-mid); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ============================================
   Navigation — transparent by default
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: transparent;
    z-index: 1000;
    transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.navbar.scrolled {
    background: var(--ceg-navy);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* Interior pages: always solid navbar */
body.page-interior .navbar {
    background: var(--ceg-navy);
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ceg-white);
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-symbol {
    font-family: 'IBM Plex Sans', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ceg-light);
    letter-spacing: 1px;
    background: rgba(255,255,255,0.08);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(107,173,224,0.3);
}

.nav-brand span {
    color: var(--ceg-pale);
    font-size: 0.78rem;
    display: block;
    font-weight: 400;
    font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ceg-white);
    background: rgba(255,255,255,0.1);
}

.nav-links .lang-toggle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    margin-left: 8px;
}

.nav-links .lang-toggle:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ceg-white);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================
   Hero — Full Viewport (homepage)
   ============================================ */
.hero-full {
    margin-top: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--ceg-navy) 0%, var(--ceg-dark) 35%, var(--ceg-blue) 100%);
    color: var(--ceg-white);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-full::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 1200 600"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0%25" stop-color="%236BADE0" stop-opacity="0.06"/><stop offset="100%25" stop-color="%232B6CB0" stop-opacity="0.02"/></linearGradient></defs><rect fill="url(%23g)" width="1200" height="600"/><circle cx="200" cy="300" r="200" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.12"/><circle cx="200" cy="300" r="260" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.08"/><circle cx="200" cy="300" r="320" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.05"/><circle cx="900" cy="150" r="120" fill="none" stroke="%238DC8F0" stroke-width="0.5" opacity="0.08"/><circle cx="900" cy="150" r="180" fill="none" stroke="%238DC8F0" stroke-width="0.5" opacity="0.05"/><line x1="0" y1="460" x2="1200" y2="460" stroke="%236BADE0" stroke-width="0.5" opacity="0.08"/><line x1="0" y1="480" x2="1200" y2="480" stroke="%236BADE0" stroke-width="0.5" opacity="0.06"/><line x1="0" y1="500" x2="1200" y2="500" stroke="%236BADE0" stroke-width="0.5" opacity="0.04"/><line x1="0" y1="520" x2="1200" y2="520" stroke="%236BADE0" stroke-width="0.5" opacity="0.02"/></svg>') center/cover no-repeat;
    animation: heroPatternDrift 30s ease-in-out infinite alternate;
}

@keyframes heroPatternDrift {
    0% { transform: scale(1) translateX(0); }
    100% { transform: scale(1.05) translateX(-20px); }
}

.hero-full .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ceg-accent);
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-full h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-full h1 .accent { color: var(--ceg-light); }

.hero-full .subtitle {
    font-size: 1.3rem;
    opacity: 0.85;
    margin-bottom: 12px;
    font-weight: 300;
    max-width: 600px;
}

.hero-full .company-info {
    font-size: 0.95rem;
    opacity: 0.6;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Legacy .hero (for CTA sections) */
.hero {
    margin-top: var(--nav-height);
    background: linear-gradient(135deg, var(--ceg-dark) 0%, #1E4D78 40%, var(--ceg-blue) 100%);
    color: var(--ceg-white);
    padding: 90px 0;
    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 500"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0%25" stop-color="%236BADE0" stop-opacity="0.08"/><stop offset="100%25" stop-color="%232B6CB0" stop-opacity="0.03"/></linearGradient></defs><rect fill="url(%23g)" width="1000" height="500"/><circle cx="150" cy="250" r="180" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.15"/><circle cx="150" cy="250" r="220" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.1"/><circle cx="150" cy="250" r="260" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.06"/><line x1="0" y1="380" x2="1000" y2="380" stroke="%236BADE0" stroke-width="0.5" opacity="0.1"/><line x1="0" y1="400" x2="1000" y2="400" stroke="%236BADE0" stroke-width="0.5" opacity="0.08"/><line x1="0" y1="420" x2="1000" y2="420" stroke="%236BADE0" stroke-width="0.5" opacity="0.05"/></svg>') center/cover no-repeat;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero h1 .accent { color: var(--ceg-light); }

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 12px;
    font-weight: 300;
}

.hero .company-info {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 32px;
}

/* Interior page hero */
.hero-page {
    margin-top: var(--nav-height);
    background: linear-gradient(160deg, var(--ceg-navy) 0%, var(--ceg-dark) 60%, var(--ceg-blue) 100%);
    color: var(--ceg-white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-page::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 300"><circle cx="800" cy="100" r="150" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.1"/><circle cx="800" cy="100" r="200" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.06"/><line x1="0" y1="240" x2="1000" y2="240" stroke="%236BADE0" stroke-width="0.5" opacity="0.08"/><line x1="0" y1="260" x2="1000" y2="260" stroke="%236BADE0" stroke-width="0.5" opacity="0.05"/></svg>') center/cover no-repeat;
}

.hero-page .container { position: relative; z-index: 1; }
.hero-page h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.hero-page h1 .accent { color: var(--ceg-light); }
.hero-page .subtitle { font-size: 1.1rem; opacity: 0.8; font-weight: 300; max-width: 600px; }

/* Legacy hero-small (backward compat) */
.hero-small {
    padding: 50px 0;
}
.hero-small h1 { font-size: 2.2rem; margin-bottom: 8px; }
.hero-small .subtitle { margin-bottom: 0; }

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
    background: linear-gradient(90deg, var(--ceg-navy), var(--ceg-dark));
    padding: 48px 0;
    color: var(--ceg-white);
    position: relative;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item {
    padding: 24px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    transition: background var(--transition);
}

.stat-item:hover {
    background: rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--ceg-light);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 4px;
    font-weight: 400;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-family: 'IBM Plex Sans', -apple-system, sans-serif;
}

.btn-primary {
    background: var(--ceg-light);
    color: var(--ceg-dark);
}
.btn-primary:hover { background: var(--ceg-accent); color: var(--ceg-dark); }

.btn-outline {
    border-color: rgba(255,255,255,0.4);
    color: var(--ceg-white);
    background: transparent;
}
.btn-outline:hover { border-color: var(--ceg-white); color: var(--ceg-white); }

.btn-ghost {
    border-color: rgba(255,255,255,0.3);
    color: var(--ceg-white);
    background: transparent;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: var(--ceg-white); }

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-secondary {
    background: var(--ceg-blue);
    color: var(--ceg-white);
}
.btn-secondary:hover { background: var(--ceg-dark); color: var(--ceg-white); }

.btn-outline-dark {
    border-color: var(--ceg-blue);
    color: var(--ceg-blue);
    background: transparent;
}
.btn-outline-dark:hover { background: var(--ceg-blue); color: var(--ceg-white); }

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--ceg-bg);
}

.section-dark {
    background: var(--ceg-navy);
    color: var(--ceg-white);
}

.section-dark .section-title { color: var(--ceg-white); }
.section-dark .section-subtitle { color: rgba(255,255,255,0.7); }
.section-dark .blue-bar { background: linear-gradient(90deg, var(--ceg-light), var(--ceg-accent)); }
.section-dark .feature-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.section-dark .feature-card h3 { color: var(--ceg-white); }
.section-dark .feature-card p { color: rgba(255,255,255,0.7); }
.section-dark .feature-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ceg-dark);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--ceg-gray);
    font-size: 1.05rem;
    margin-bottom: 48px;
    max-width: 600px;
}

.blue-bar {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--ceg-blue), var(--ceg-light));
    margin-bottom: 16px;
}

/* ============================================
   Feature Cards
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.4s var(--ease-out);
    border-top: 3px solid transparent;
    position: relative;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ceg-blue), var(--ceg-light));
    transition: width 0.4s var(--ease-out);
    border-radius: 0 0 2px 2px;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-top-color: transparent;
}

.feature-card:hover::after {
    width: 100%;
}

.feature-card .icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--ceg-dark), var(--ceg-blue));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--ceg-white);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--ceg-dark);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--ceg-gray);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ============================================
   Service Cards (horizontal)
   ============================================ */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.service-card {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 36px;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--ceg-blue);
    transition: all 0.4s var(--ease-out);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-left-color: var(--ceg-light);
    transform: translateX(4px);
}

.service-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--ceg-dark), var(--ceg-blue));
    color: var(--ceg-white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.15rem;
    color: var(--ceg-dark);
    margin-bottom: 8px;
}

.service-card p {
    color: var(--ceg-gray);
    font-size: 0.9rem;
    line-height: 1.7;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.service-tag {
    display: inline-block;
    padding: 3px 12px;
    background: var(--ceg-bg);
    color: var(--ceg-blue);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* ============================================
   Software Showcase
   ============================================ */
.sw-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.sw-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sw-feature {
    text-align: center;
    padding: 24px 16px;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sw-feature .icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.sw-feature h3 { font-size: 0.95rem; color: var(--ceg-dark); margin-bottom: 4px; }
.sw-feature p { font-size: 0.82rem; color: var(--ceg-gray); }

/* ============================================
   Project Cards
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    border-top: 3px solid transparent;
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--ceg-blue), var(--ceg-light));
    transition: width 0.4s var(--ease-out);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::after { width: 100%; }

.project-card-body { padding: 28px; }

.project-method {
    display: inline-block;
    padding: 3px 12px;
    background: var(--ceg-dark);
    color: var(--ceg-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card h3 { font-size: 1.05rem; color: var(--ceg-dark); margin-bottom: 6px; }
.project-card .client { font-size: 0.85rem; color: var(--ceg-blue); margin-bottom: 8px; font-weight: 500; }
.project-card p { font-size: 0.88rem; color: var(--ceg-gray); }
.project-year { font-size: 0.8rem; color: var(--ceg-gray); margin-top: 10px; }

/* ============================================
   Team
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.team-card {
    text-align: center;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    transition: all var(--transition);
}

.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.team-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    background: var(--ceg-bg);
    border: 3px solid var(--ceg-mid);
}

.team-photo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--ceg-dark), var(--ceg-blue));
    color: var(--ceg-white);
    border: 3px solid var(--ceg-mid);
}

.team-card h3 { color: var(--ceg-dark); font-size: 1.1rem; margin-bottom: 4px; }
.team-card .role { color: var(--ceg-mid); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.team-card p { color: var(--ceg-gray); font-size: 0.85rem; }

.team-lead {
    grid-column: 1 / -1;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: center;
    text-align: left;
    padding: 40px;
}
.team-lead .team-photo-placeholder { margin: 0; flex-shrink: 0; }

/* ============================================
   News
   ============================================ */
.news-list { display: flex; flex-direction: column; gap: 20px; }

.news-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.4s var(--ease-out);
}

.news-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.news-date {
    background: var(--ceg-dark);
    color: var(--ceg-light);
    padding: 10px 14px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 700;
    min-width: 65px;
    line-height: 1.2;
}

.news-date .month { font-size: 0.75rem; text-transform: uppercase; display: block; color: rgba(255,255,255,0.7); }
.news-date .day { font-size: 1.4rem; display: block; }

.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.news-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ceg-blue); font-weight: 600; }
.news-content { flex: 1; }
.news-content h3 { font-size: 1rem; color: var(--ceg-dark); margin-bottom: 4px; }
.news-content p { font-size: 0.9rem; color: var(--ceg-gray); }
.news-link { display: inline-block; margin-top: 8px; font-size: 0.85rem; color: var(--ceg-blue); font-weight: 600; }
.news-link:hover { text-decoration: underline; }

/* ============================================
   Contact
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item .icon {
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--ceg-dark), var(--ceg-blue));
    color: var(--ceg-white);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item h3 { font-size: 0.95rem; color: var(--ceg-dark); margin-bottom: 2px; }
.contact-item p { font-size: 0.9rem; color: var(--ceg-gray); }
.contact-item a { color: var(--ceg-blue); }

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 350px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ============================================
   Publications
   ============================================ */
.pub-list { display: flex; flex-direction: column; gap: 16px; }

.pub-item {
    padding: 20px 24px;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 3px solid var(--ceg-blue);
}

.pub-item:hover { border-left-color: var(--ceg-light); }
.pub-item h3 { font-size: 0.95rem; color: var(--ceg-dark); margin-bottom: 6px; line-height: 1.5; }
.pub-item .journal { color: var(--ceg-blue); font-style: italic; font-size: 0.88rem; }
.pub-item .authors { color: var(--ceg-gray); font-size: 0.85rem; margin-bottom: 4px; }

/* Publication Cards (homepage) */
.pub-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.pub-card {
    background: var(--ceg-white);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid var(--ceg-mid);
    box-shadow: var(--shadow);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pub-year {
    display: inline-block;
    background: var(--ceg-dark);
    color: var(--ceg-light);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}
.pub-card h3 { font-size: 0.95rem; line-height: 1.4; margin-bottom: 8px; color: var(--ceg-dark); }
.pub-authors { font-size: 0.82rem; color: var(--ceg-gray); line-height: 1.5; margin-bottom: 10px; }

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--ceg-dark) 0%, var(--ceg-blue) 100%);
    color: var(--ceg-white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::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 300"><circle cx="500" cy="150" r="200" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.08"/><circle cx="500" cy="150" r="280" fill="none" stroke="%236BADE0" stroke-width="0.5" opacity="0.04"/></svg>') center/cover no-repeat;
}

.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.cta-section p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 32px; font-weight: 300; }

/* ============================================
   Footer — Dark 4-column
   ============================================ */
.footer {
    background: var(--ceg-footer);
    color: rgba(255,255,255,0.6);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: var(--ceg-white);
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.footer-brand .tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
    font-style: italic;
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-col h4 {
    color: var(--ceg-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: rgba(255,255,255,0.55); font-size: 0.88rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--ceg-light); }

/* Legacy footer-links/footer-content (for pages still using old markup) */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 28px;
}

.footer-links h4 { color: var(--ceg-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-links a:hover { color: var(--ceg-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* ============================================
   Scroll Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-children > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > .fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--ceg-navy);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a { padding: 12px 16px; width: 100%; }

    .hero-full { min-height: 80vh; }
    .hero-full h1 { font-size: 2.4rem; }
    .hero-full .subtitle { font-size: 1.05rem; }

    .hero { padding: 50px 0; }
    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1rem; }

    .hero-page h1 { font-size: 1.8rem; }
    .hero-small h1 { font-size: 1.6rem; }

    .feature-grid { grid-template-columns: 1fr; }
    .sw-hero { grid-template-columns: 1fr; }
    .sw-features { grid-template-columns: 1fr 1fr; }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-content { flex-direction: column; }
    .project-grid { grid-template-columns: 1fr; }
    .pub-cards { grid-template-columns: 1fr; }

    .service-card { flex-direction: column; }
    .team-lead { flex-direction: column; text-align: center; }

    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero-full h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .sw-features { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Admin Styles
   ============================================ */

.form-card {
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ceg-dark);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #CBD5E0;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ceg-blue);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error { background: #FED7D7; color: #9B2C2C; border: 1px solid #FEB2B2; }
.alert-success { background: #C6F6D5; color: #276749; border: 1px solid #9AE6B4; }

.admin-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ceg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table thead { background: var(--ceg-dark); color: var(--ceg-white); }
.admin-table th { padding: 12px 16px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.admin-table td { padding: 12px 16px; font-size: 0.88rem; border-bottom: 1px solid #EDF2F7; vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--ceg-bg); }
