:root {
    /* Light Theme Variables */
    --bg-color: #f4f7fb;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --primary-color: #0984e3;
    --primary-hover: #74b9ff;
    --secondary-color: #2d3436;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --alt-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary-color: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --alt-bg: #0b1120;
    --nav-bg: rgba(15, 23, 42, 0.85);
}

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

html, body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    transition: padding 0.3s ease;
    padding: 1rem 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.03);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.lang-switcher a {
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.lang-switcher a.active, .lang-switcher a:hover {
    color: var(--text-color);
}

.lang-switcher span {
    margin: 0 0.2rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.15;
    z-index: -1;
    filter: blur(80px);
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* Sections */
.section {
    padding: 6rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Parallax Background Utility */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65); /* Consistent dark overlay for contrast */
    z-index: 0;
}

.parallax-bg > .container {
    position: relative;
    z-index: 1;
}

/* Ensure headings on parallax backgrounds are white and have a shadow */
.parallax-bg h1, .parallax-bg h2.section-title, .parallax-bg p {
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}
.parallax-bg h1 {
    -webkit-text-fill-color: #ffffff; /* Override hero gradient text */
}

/* Premium frosted glass for cards and forms inside parallax sections */
.parallax-bg .glass {
    background: rgba(255, 255, 255, 0.15) !important; /* Very transparent */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Force all text inside parallax glass elements to be white for contrast */
.parallax-bg .glass h1, 
.parallax-bg .glass h2, 
.parallax-bg .glass h3, 
.parallax-bg .glass h4, 
.parallax-bg .glass p,
.parallax-bg .glass label,
.parallax-bg .glass .checkbox-group label {
    color: #ffffff !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6) !important;
}

/* Contact form inputs inside parallax glass */
.parallax-bg .glass .form-group input,
.parallax-bg .glass .form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.parallax-bg .glass .form-group input::placeholder,
.parallax-bg .glass .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Grid & Cards */
.grid {
    display: grid;
    gap: 2rem;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.4s ease;
}

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

.card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Portfolio */
.portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 1.5rem;
    border-radius: 15px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 3rem;
    border-radius: 20px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-messages {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.success { color: #22c55e; }
.error { color: #ef4444; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    text-align: center;
}

.cookie-btns {
    display: flex;
    gap: 1rem;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.checkbox-group input {
    width: auto;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Mobile menu needed in future */
    .hero h1 { font-size: 2.5rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

/* AI Chat Widget */
.ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    z-index: 1000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-body {
    background: var(--bg-color);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-messages {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    padding: 10px;
    border-radius: 8px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-msg {
    background: rgba(0, 114, 255, 0.1);
    border: 1px solid rgba(0, 114, 255, 0.2);
    align-self: flex-start;
}

.user-msg {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: var(--glass-bg);
}

#chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
}

#chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}
