@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* 
 * Core Design System for ANANDA THIRTHA APPS SOLUTIONS 
 * Theme: Modern, Premium, High-Tech IT Services
 */

:root {
    /* Color Palette - Refined Branding (Orange & Dark) */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #ff6b00;
    /* Vibrant Orange from Logo */
    --accent-hover: #e65a00;
    --secondary: #ff3d00;

    /* Text Colors */
    --text-main: #f8fafc;
    /* Light text for dark body */
    --text-dark: #1e293b;
    /* Dark text for white patches */
    --text-muted: #94a3b8;
    --text-light: #ffffff;

    /* Background Colors */
    --bg-main: #020617;
    --bg-white: #ffffff;
    --bg-card: rgba(30, 41, 59, 0.5);

    /* Effects & Transitions */
    --transition-fast: all 0.2s ease;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --glass: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

label {
    color: inherit;
    /* inherit from container */
}

input,
select,
textarea {
    color: var(--text-dark);
    /* Form inputs usually have light bg, so use dark text */
    font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- Layout Components --- */

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    color: var(--text-light);
}

.glass-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.glass-card h3 {
    color: var(--text-light);
    margin-bottom: 12px;
}

.glass-card p {
    color: var(--text-muted);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-light);
}

.white-patch .section-title,
.white-patch h1,
.white-patch h2,
.white-patch h3,
.white-patch h4,
.white-patch label {
    color: var(--text-dark) !important;
}

.white-patch p {
    color: #475569;
}

.colorful-card {
    background: linear-gradient(165deg, #ffffff 0%, #fdf9f6 100%);
    border-radius: var(--radius);
    padding: 35px;
    position: relative;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.colorful-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.colorful-card h1,
.colorful-card h2,
.colorful-card h3,
.colorful-card h4,
.colorful-card p,
.colorful-card label,
.colorful-card li,
.colorful-card span {
    color: var(--text-dark) !important;
}

/* --- Navigation --- */

.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 100px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.navbar.scrolled {
    height: 85px;
    /* Stay large but slightly smaller */
    background: var(--bg-white) !important;
    /* Force white background */
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 54px;
    transition: var(--transition-fast);
}

.nav-links {
    display: flex;
    gap: 40px;
    /* More spacing */
    list-style: none;
}

.nav-links a {
    font-weight: 700;
    color: #1e293b !important;
    font-size: 1.05rem;
    position: relative;
    padding: 10px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* --- Hero Section & Backgrounds --- */

.hero,
.inner-hero {
    padding: 200px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background-color: var(--bg-dark);
}

.inner-hero {
    padding: 350px 0 250px !important;
}

.hero::after,
.inner-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.3) 100%) !important;
    z-index: 1;
}

.hero::before,
.inner-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    z-index: 2;
    pointer-events: none;
}

.hero>*,
.inner-hero>* {
    position: relative;
    z-index: 3;
}

/* Page Specific Hero Backgrounds */
.hero-home {
    background-image: url('../images/home-hero.png');
}

.hero-about {
    background-image: url('../images/about-hero.png');
}

.hero-services {
    background-image: url('../images/services-hero.png');
}

.hero-products {
    background-image: url('../images/products-hero.png');
}

.hero-contact {
    background-image: url('../images/contact-hero.png');
}

.hero-blog {
    background-image: url('../images/blog-hero.png');
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.inner-hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    gap: 10px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* --- Layout Components (Extended) --- */

.white-patch {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 80px 0;
    margin-top: -60px;
    border-radius: 40px 40px 0 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 -20px 30px rgba(0, 0, 0, 0.1);
}

.white-patch h1,
.white-patch h2,
.white-patch h3,
.white-patch h4 {
    color: var(--text-dark);
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

/* --- WhatsApp Floating Button --- */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* --- Responsive & Mobile Menu --- */

@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1100;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 10px;
        display: block;
    }

    .nav-cta {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .inner-hero h1 {
        font-size: 2.2rem;
    }
}

/* --- Admin Panel --- */
.sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 30px 0;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 0 30px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.nav-item {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    border-left: 4px solid var(--accent);
}

.main-content {
    flex: 1;
    padding: 40px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: 0.3s ease-in-out;
        width: 260px !important;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 20px;
        margin-top: 60px;
        /* Space for mobile header */
    }

    /* Mobile Header */
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #0f172a;
        color: white;
        z-index: 900;
        align-items: center;
        padding: 0 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        justify-content: space-between;
    }

    .menu-toggle {
        font-size: 1.5rem;
        cursor: pointer;
        background: none;
        border: none;
        color: white;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Responsive Tables */
    .table-container,
    .card {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
        /* Force scroll */
    }

    /* Grid Adjustments */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

.mobile-header {
    display: none;
}


/* Drawer Mobile Responsiveness */
@media (max-width: 768px) {
    .drawer {
        width: 100% !important;
        right: -100% !important;
        padding: 20px !important;
    }

    .drawer.open {
        right: 0 !important;
    }

    /* Adjust input grids in drawer on mobile */
    .drawer form>div[style*='grid-template-columns'] {
        grid-template-columns: 1fr !important;
    }

    .price-row {
        grid-template-columns: 1fr !important;
    }
}


/* --- Drawer System (Desktop Defaults) --- */
.drawer {
    position: fixed;
    top: 0;
    right: -850px;
    width: 800px;
    max-width: 95vw;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
    z-index: 2000;
    padding: 30px;
    overflow-y: auto;
}

.drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1999;
}

.drawer-overlay.open {
    display: block;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}


/* --- Mobile Layout Fixes (Phase 2) --- */
@media (max-width: 768px) {

    /* Responsive Page Headers */
    .page-header,
    .main-content>div:first-child,
    .main-content>header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .page-header>div:last-child,
    .main-content>div:first-child>div:last-child {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .page-header .btn,
    .main-content>div:first-child .btn {
        flex: 1 !important;
        display: flex;
        justify-content: center;
        white-space: nowrap;
    }

    /* Responsive Filter Bars */
    .filter-bar,
    form.filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100% !important;
        flex: none !important;
    }

    /* Responsive Modals */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .full-width {
        grid-column: span 1 !important;
    }

    /* Stats Grid fix */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Footer --- */

.footer {
    background: var(--bg-dark);
    padding: 100px 0 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-4px);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--accent);
    margin-top: 4px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.developer-tag {
    display: flex;
    align-items: center;
    gap: 12px;
}

.developer-tag span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 0.85rem;
}

.developer-tag img {
    height: 32px;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.developer-tag img:hover {
    opacity: 1;
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* --- Portfolio Page Styles --- */
.hero-portfolio {
    background-image: url('../images/portfolio-hero.png');
}

.portfolio-journey {
    padding: 100px 0;
    background: var(--bg-main);
    position: relative;
}

/* Timeline Components */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 107, 0, 0.2);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-main);
    border: 4px solid var(--accent);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 30px;
    background: var(--bg-card);
    position: relative;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.timeline-content .year {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.client-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid #f1f5f9;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.client-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.client-card h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.client-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Timeline */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .right {
        left: 0;
    }
}

/* Portfolio Our Vision Styling */
.portfolio-vision-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.portfolio-vision-card h3 {
    color: #ffffff !important;
    font-weight: 800 !important;
}