/* --- CSS Variables --- */
:root {
    --primary-color: #6366f1; /* Modern Vibrant Indigo */
    --primary-color-dark: #4f46e5; /* Deep Indigo for hover */
    --dark-background: #0f172a; /* Slate 900 for high contrast accents */
    --secondary-color: #f1f5f9; /* Slate 100 for section breaks */
    --text-color: #1e293b; /* Slate 800 - much softer and elegant than pure black */
    --text-color-light: #f8fafc;
    --main-bg: #f8fafc; /* Sleek, crisp off-white for the main background */
    --card-bg: #ffffff; /* Pure white for elements that pop */
    --header-bg: rgba(255, 255, 255, 0.85); /* Glassmorphism header */
    --shadow-color: rgba(51, 65, 85, 0.08); /* Sophisticated subtle shadow */
    --body-font: 'Roboto Mono', monospace;
    --container-width: 1100px;
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
    --dark-background: #f8fafc; /* Becomes light background */
    --secondary-color: #1e293b; /* Darker gray for sections */
    --text-color: #f8fafc; /* Light text */
    --text-color-light: #94a3b8; /* Muted text */
    --main-bg: #0f172a; /* Slate 900 */
    --header-bg: #1e293b; /* Slate 800 */
    --card-bg: rgba(30, 41, 59, 0.7); /* Translucent slate */
    --shadow-color: rgba(0, 0, 0, 0.4); /* Stronger dark mode shadow */
}

/* Show the blurred background image only in dark mode */
[data-theme="dark"] body::before {
    opacity: 0.5;
}

/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    /* opacity: 0; and animation: fadeIn; are removed as preloader handles initial view */
    background-color: var(--main-bg, #fff); /* This will be the color behind the transparent image */
    padding-top: 70px; /* Add padding to offset the fixed header */
    /* --- Sticky Footer --- */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* --- End Sticky Footer --- */
}

/* Add a pseudo-element to hold and style the background image */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Bkg/bkg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(8px); /* Apply the blur effect */
    opacity: 0; /* Hidden by default (in light mode) */
    z-index: -1; /* Place it behind all other content */
    transition: opacity 0.4s ease; /* Smooth transition for the background */
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
}

.container {
    max-width: var(--container-width);
    margin: auto;
    padding: 0 1.5rem;
    overflow: hidden;
}

/* Make main content area grow to push footer down */
main {
    flex-grow: 1;
}

/* --- Header & Navigation --- */
header {
    background: transparent;
    position: fixed; /* Changed from sticky to fixed for overlay effect */
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Style for the header when the page is scrolled */
header.scrolled {
    /* Apply a semi-transparent background and a blur effect */
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* For Safari support */
    box-shadow: 0 4px 20px var(--shadow-color);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    /* color: var(--text-color); */ /* No longer needed for text */
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Add spacing between logo and text */
}

.logo img {
    height: 35px; /* Adjust height as needed */
    width: auto;
}

.logo-text {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: var(--text-color);
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
}

/* --- Particles.js Container --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2; /* Place it behind all other content, including body::before */
    background-color: transparent; /* Allow the body's background to show through if needed */
}

/* Hamburger animation to 'X' */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Theme Switch --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.theme-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
    width: 90px; /* Adjusted width to keep "Visual mode" on a single line */
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 48px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- Hero Section --- */
.hero {
    /* Background removed to allow body background to show */
    background: transparent;
    color: var(--text-color); /* Use the main text color which adapts to the theme */
    height: calc(100vh - 70px); /* Adjust height to fill viewport below header */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: -70px; /* Pull hero section up to fill space behind transparent header */
}

.hero .container {
    /* Removed all background, blur, border, and shadow */
    background: transparent;
    backdrop-filter: none;
    padding: 2rem;
    border: none;
    box-shadow: none;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    min-height: 5rem; /* Reserve space to prevent layout shift */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Animation */
    opacity: 0;
    animation: heroTextAnimation 0.6s ease-out 0.6s forwards;
}

.hero a {
    opacity: 0;
    animation: heroTextAnimation 0.6s ease-out 0.8s forwards;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff; /* Always force white for high contrast catchiness */
    padding: 14px 32px;
    border-radius: 50px; /* Energetic pill shape */
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); /* Dynamic glow */
}

.btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px); /* Interactive lift */
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.text-center {
    text-align: center;
}

/* Ensure h2 inside a text-center container is also centered */
.text-center h2 {
    text-align: center;
}

/* All sections are now full viewport height modules */
section {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px; /* Account for fixed header spacing */
    scroll-margin-top: 70px; /* Prevents titles from being hidden behind fixed header */
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

/* --- Services Overview --- */
.services-overview {
    /* Use the same background as the hero for the blur effect to work */
    background: transparent; /* Removed background image */
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    /* Removed all background, blur, and border */
    background: transparent;
    backdrop-filter: none;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover {
    transform: translateY(-10px); /* Lift card on hover */
    /* box-shadow: 0 12px 25px rgba(0,0,0,0.12); */ /* Keep or remove based on preference */
}
.card h3 {
    margin-bottom: 1rem;
}

.disabled-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Makes the link unclickable */
}

.coming-soon {
    color: #e74c3c; /* Red color for the label */
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem; /* Add space below the label */
    margin-top: -0.5rem; /* Pull it closer to the heading */
}

/* --- CTA Section --- */
.cta {
    background: var(--dark-background);
    background: transparent; /* Removed background */
    text-align: center;
}

.cta h2 {
    font-size: 2.2rem;
}

.cta .btn {
    background: var(--primary-color);
    color: var(--dark-background);
}

.cta .btn:hover {
    background: var(--primary-color-dark);
    color: #fff;
}

/* --- Page Header (for inner pages) --- */
.page-header {
    background: var(--primary-color-dark);
    color: white;
    padding: 6rem 0 3rem;
    text-align: center;
    min-height: 100vh;
    min-height: 100svh;
}

.page-header h1 {
    font-size: 2.8rem;
}

.content {
    max-width: 800px;
    margin: 0 auto;
}

/* When content is centered, ensure h2 is also centered */
.content.text-center h2 {
    text-align: center;
}

.content h2 { text-align: center; }
.content p { margin-bottom: 1rem; }

/* --- Services List Page --- */
.service-item {
    background: var(--card-bg); /* Add pop with stark white contrast */
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    border-radius: 12px; /* Smooth corners */
    box-shadow: 0 10px 30px var(--shadow-color); /* Depth and catching elevation */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px); /* Interactive popping effect */
    box-shadow: 0 15px 40px var(--shadow-color);
}
.service-item img {
    margin-bottom: 1rem;
    border-radius: 5px;
}

/* Clear distinction between tile heading and paragraph body */
.service-item h3 { 
    text-align: left; 
    color: var(--primary-color-dark); /* Distinctive deep indigo heading */
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.service-item p {
    color: #475569; /* Slate grey for softer body text reading */
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.portfolio-filter-container {
    /* This container is no longer used */
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.8;
}

.portfolio-select {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    background-color: var(--card-bg, #fff);
    color: var(--text-color);
    min-width: 200px;
}
/* Remove old button styles */
/* #portfolio-category-filters {
    display: none;
}
.filter-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}
*/
#portfolio-search {
    flex-grow: 1; /* Allow search to take remaining space */
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    background-color: var(--card-bg, #fff);
    color: var(--text-color);
}
/* --- Portfolio Slider/Marquee --- */
.portfolio-slider-wrapper {
    max-width: 100%;
    overflow: hidden;
    /* Create the transparent fade effect on the sides */
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

@keyframes slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

#portfolio-container {
    /* display: grid; is replaced with flex for the slider */
    display: flex;
    gap: 2rem;
    width: fit-content; /* Container width is determined by its content */
    animation: slide 40s linear infinite; /* Adjust duration to change speed */
}

.portfolio-slider-wrapper:hover #portfolio-container {
    animation-play-state: paused; /* Pause animation on hover */
}

.portfolio-item {
    width: 350px; /* Give cards a fixed width */
    flex-shrink: 0; /* Prevent cards from shrinking */
    background: var(--card-bg, #fff);
    box-shadow: 0 5px 15px var(--shadow-color, rgba(0,0,0,0.08));
    border-radius: 8px;
    overflow: hidden;
    display: block; /* Make the anchor a block element */
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Remove grid-based styles that are no longer needed */
/* #portfolio-search { ... } */
/* #portfolio-container (grid styles) { ... } */
/* .portfolio-item (old styles) { ... } */
.portfolio-item img {
    display: block;
    height: 220px; /* Give images a fixed height */
    object-fit: cover; /* Ensure images cover the area without distortion */
}

.portfolio-item h3, .portfolio-item p { padding: 0 1rem; }
.portfolio-item h3 { margin-top: 1rem; color: var(--text-color); }
.portfolio-item p { padding-bottom: 1.5rem; }

/* --- Portfolio Detail Page --- */
.portfolio-detail-category {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: -1rem;
}

.portfolio-detail-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color, rgba(0,0,0,0.15));
}

.portfolio-detail-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: var(--primary-color-dark);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Portfolio Navigation (Detail Page) --- */
.portfolio-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--shadow-color, #eee);
    margin-top: 3rem;
}

.portfolio-navigation .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.portfolio-navigation .nav-link:hover {
    color: var(--primary-color);
}

.portfolio-navigation .nav-link span {
    display: flex;
    flex-direction: column;
}

.portfolio-navigation .nav-link small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
}

.portfolio-navigation .next-link {
    text-align: right;
}

/* --- Team Section (About Page) --- */
.team-section {
    background: transparent; /* Removed background */
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 8px; /* Changed from circle to rounded square */
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--header-bg, #fff);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-member h3 {
    margin-bottom: 0.25rem;
}

.team-member .role {
    color: #aaa;
    font-weight: 400;
}

.vacant-title {
    color: #e74c3c; /* Red color for vacant positions */
}

.team-member-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.team-member-link:hover {
    transform: translateY(-5px);
}

/* --- Back to Top Button --- */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 20px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button 30px from the right */
    z-index: 99; /* Make sure it does not overlap with other elements */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--primary-color);
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Make it a circle */
    font-size: 20px; /* Icon size */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.9;
}

#backToTopBtn:hover {
    background-color: var(--primary-color-dark); /* Darker background on hover */
    opacity: 1;
    transform: translateY(-5px); /* Lift button on hover */
}

/* --- Floating Feedback Button --- */
.floating-feedback-btn {
    display: none !important;
    position: fixed;
    bottom: 20px;
    left: 30px;
    z-index: 99;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: 0 4px 10px var(--shadow-color, rgba(0,0,0,0.1));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-feedback-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color, rgba(0,0,0,0.15));
}
/* --- Animation Styles --- */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Contact Form --- */
.contact-form { margin-top: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { 
    display: block; 
    text-align: center; /* Center the labels */
    margin-bottom: 0.5rem; 
    font-weight: 600; 
    font-size: 0.95rem;
    color: var(--text-color);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    background-color: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Success Validation States ! */
.form-group input.valid,
.form-group textarea.valid {
    border-color: #10b981; /* Emerald Green */
    background-color: rgba(16, 185, 129, 0.05); /* Soft transparent green */
}
.form-group input.valid:focus,
.form-group textarea.valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); /* Replaces indigo ring with green ring */
}

.contact-form .btn {
    position: relative; /* For spinner positioning */
    display: block;
    margin: 1.5rem auto 0; /* Center horizontally */
    min-width: 200px;
    cursor: pointer;
    /* Removed hardcoded blue to match global primary button variables */
}
.contact-form .btn:disabled {
    background: #cbd5e1;
    color: #64748b;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.contact-form .btn.loading {
    color: transparent !important; /* Hide button text */
    pointer-events: none;
}

.contact-form .btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 0.8s ease infinite;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05); /* Slight error tint */
}

/* Style the placeholder text when it acts as an error message */
.form-group input.invalid::placeholder,
.form-group textarea.invalid::placeholder {
    color: #dc3545;
    font-weight: 600;
    opacity: 1; /* Override default browser fade */
}

.error-message {
    display: none; /* Safely hide the external error elements */
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Contact Form Success Message */
.success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(40, 167, 69, 0.8); /* Green background */
    color: #fff;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}
.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}
/* --- Footer --- */
footer {
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    color: #fff; /* Set text color to white */
    text-align: center;
    padding: 1.5rem 0;
}
footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
footer a {
    color: #fff; /* Set link color to white */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
footer a:hover { opacity: 1; }

/* Style for the AuraTek link in the copyright text */
footer p a {
    color: var(--primary-color);
    font-weight: 700; /* Bold */
    opacity: 1;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.social-icons a {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.1); /* Add scaling effect on hover */
}

.social-icons a:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Brand-specific hover colors */
.social-icons a[aria-label="LinkedIn"]:hover { background-color: #0077B5; border-color: #0077B5; }
.social-icons a[aria-label="WhatsApp"]:hover { background-color: #25D366; border-color: #25D366; }
.social-icons a[aria-label="Facebook"]:hover { background-color: #1877F2; border-color: #1877F2; }
.social-icons a[aria-label="Instagram"]:hover { background-color: #E4405F; border-color: #E4405F; }
.social-icons a[aria-label="YouTube"]:hover { background-color: #FF0000; border-color: #FF0000; }

/* Also update tooltip background color to match */
.social-icons a[aria-label="LinkedIn"]:hover::after { background-color: #0077B5; }
.social-icons a[aria-label="WhatsApp"]:hover::after { background-color: #25D366; }
.social-icons a[aria-label="Facebook"]:hover::after { background-color: #1877F2; }
.social-icons a[aria-label="Instagram"]:hover::after { background-color: #E4405F; }
.social-icons a[aria-label="YouTube"]:hover::after { background-color: #FF0000; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--header-bg, #fff);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease-in-out;
    }
    .nav-links.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    
    /* Layout Density Optmization for touch and scoll */
    section { padding: 3rem 0; }
    .hero h1 { font-size: 2.2rem; min-height: 4rem; }
    .hero p { font-size: 1.05rem; padding: 0 1rem; }
    section h2, .page-header h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
    .btn { padding: 12px 24px; font-size: 0.95rem; }
    
    /* Component Scaling */
    .service-item { padding: 1.5rem; }
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .portfolio-item { width: 300px; }
}

@media (max-width: 480px) {
    /* Extreme Mobile Optimization for typical phone screens */
    .hero h1 { font-size: 1.8rem; min-height: 5rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem; width: 100%; text-align: center; }
    .contact-form .btn { width: 100%; } /* Default to full width for phones */
    .form-group input, .form-group textarea { padding: 0.8rem 1rem; }
}

/* --- Page Transition Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* This class will be added by JavaScript before navigating away */
.page-fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--main-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Animate the transform property for the slide effect */
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.hidden {
    /* On page load, slide the preloader up and out of view */
    transform: translateY(-100%);
}

/* This class will be added by JS to bring the preloader back into view */
.preloader-slide-in {
    transform: translateY(0);
}

/* The .visible class is no longer needed for this effect */
/* .preloader.visible { ... } */

.preloader .preloader-logo {
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader .preloader-logo img {
    height: 80px;
    width: auto;
}

/* Logic to show the correct logo based on theme */
.preloader .logo-dark { display: none; }
[data-theme="dark"] .preloader .logo-light { display: none; }
[data-theme="dark"] .preloader .logo-dark { display: block; }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes heroTextAnimation {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blinkAndFade {
    0%, 45% { opacity: 1; } /* Visible for the first part */
    50%, 55% { opacity: 0; } /* Fades out and stays hidden (blink) */
    60%, 100% { opacity: 1; } /* Fades back in and stays visible */
}

/* --- Typed.js Cursor --- */
.typed-cursor {
    opacity: 1;
    animation: typedjsBlink 0.7s infinite;
    color: var(--primary-color);
    font-weight: 100;
}

/* --- Star Rating Widget --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
}
.star-rating input {
    display: none;
}
.star-rating label {
    font-size: 2.8rem;
    color: #cbd5e1; /* Slate muted */
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f59e0b; /* Amber Gold rating */
}
.star-rating label:hover {
    transform: scale(1.15); /* Pop selected cursor star */
}

/* --- Feedback Success Card --- */
.feedback-success-card {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 2rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    max-width: 600px;
    margin: 2rem auto 0 auto;
}

.feedback-success-card i {
    font-size: 2.5rem;
    color: #10b981;
    margin-bottom: 15px;
}

.feedback-success-card .success-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #10b981;
}

.feedback-success-card .success-text {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.feedback-contact-pill {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    display: inline-block;
}

.feedback-contact-pill p {
    margin: 0;
    font-size: 0.95rem;
}

.coming-soon-badge {
    display: block;
    width: fit-content;
    margin: 0 auto 1rem auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(231, 76, 60, 0.1); /* Light red background */
    color: #e74c3c; /* Red text color */
    border: 1px solid #e74c3c;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.15);
}