/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Import Animate.css for subtle animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');


/* Define Variables with Enhanced Palette */
:root {
    --tph-primary-blue: #003366;
    /* Primary Dark Blue */
    --tph-accent-blue: #00AEEF;
    /* Accent Sky Blue */
    --tph-secondary-accent: #FF6B6B;
    /* Vibrant Coral/Red for highlights */
    --tph-success-green: #28a745;
    /* Standard Success Green */
    --tph-info-cyan: #17a2b8;
    /* Standard Info Cyan */
    --tph-warning-yellow: #ffc107;
    /* Standard Warning Yellow */
    --tph-light-accent: #e6f7ff;
    /* Very Light Blue for backgrounds */
    --tph-white: #ffffff;
    --tph-light-gray: #f8f9fa;
    /* Lighter gray for dashboard BG */
    --tph-gray: #6c757d;
    --tph-dark-gray: #343a40;
    --sidebar-width: 280px;
    /* Slightly wider sidebar */
    --card-border-radius: 12px;
    /* Moderate rounded corners */
    --soft-shadow: 0 4px 12px rgba(0, 51, 102, 0.08);
    /* Softer, slightly larger shadow */
    --hover-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
    /* More pronounced hover shadow */
    --input-bg: #e9ecef;
    /* Background for form inputs */
    --border-color-light: #dee2e6;
    /* Light border color */
}

/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--tph-light-gray);
    color: var(--tph-dark-gray);
    /* Default text color */
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    line-height: 1.6;
    /* Improved readability */
}

/* Adjust body padding for mobile top/bottom navbars */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
        /* Height of mobile top navbar */
        padding-bottom: 70px;
        /* Height of mobile bottom navbar */
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tph-primary-blue);
    font-weight: 700;
    /* Bolder headings */
}

a {
    text-decoration: none;
    color: var(--tph-primary-blue);
    /* Default link color */
    transition: color 0.2s ease;
}

a:hover {
    color: var(--tph-accent-blue);
}

/* Page Wrapper for Desktop Flex Layout */
.page-wrapper {
    min-height: 100vh;
}

/* ================= Desktop Sidebar ================= */
.sidebar-desktop {
    width: var(--sidebar-width);
    height: 100vh;
    /* Full viewport height */
    position: fixed;
    /* Fixed position */
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    /* High z-index */
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color-light);
    /* Subtle border */
    transition: transform 0.3s ease;
    /* For potential future toggle */
}

.sidebar-header {
    border-bottom: 1px solid var(--border-color-light);
    min-height: 70px;
    /* Match mobile topbar height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    overflow-y: auto;
    /* Allow scrolling if content exceeds height */
    flex-grow: 1;
    /* Takes available space */
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    /* Add some bottom padding */
}

.sidebar-nav .nav-link {
    color: var(--tph-dark-gray);
    padding: 0.8rem 1.2rem;
    /* Increased padding */
    border-radius: 8px;
    /* Rounded corners for links */
    margin-bottom: 0.4rem;
    /* Increased spacing */
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.sidebar-nav .nav-link i {
    color: var(--tph-gray);
    transition: color 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--tph-light-accent);
    color: var(--tph-primary-blue);
    transform: translateX(4px);
    /* Subtle hover effect */
}

.sidebar-nav .nav-link:hover i {
    color: var(--tph-primary-blue);
}

.sidebar-nav .nav-link.active {
    background-color: var(--tph-primary-blue);
    color: var(--tph-white);
    font-weight: 600;
    box-shadow: var(--soft-shadow);
    /* Add shadow to active */
}

.sidebar-nav .nav-link.active i {
    color: var(--tph-white);
}

/* ================= Main Content Panel ================= */
.main-content {
    transition: margin-left 0.3s ease;
    /* For potential sidebar toggle */
    min-height: 100vh;
    /* Ensure it takes full height */
    display: flex;
    flex-direction: column;
    /* For footer placement */
}

/* Apply margin-left on desktop to avoid overlap with fixed sidebar */
@media (min-width: 992px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }

    .main-content>.container-fluid {
        flex-grow: 1;
        /* Allow content to push footer down */
    }
}

/* Mobile Top Navbar Specific */
.mobile-top-navbar {
    min-height: 70px;
    /* Define height for padding calculations */
    display: flex;
    align-items: center;
    padding: 0 1rem;
    /* Add padding */
}

.mobile-top-navbar .navbar-brand {
    font-size: 1.25rem;
    /* Adjust size */
}

.mobile-top-navbar .navbar-toggler {
    padding: 0.25rem 0.75rem;
    /* Adjust padding */
    font-size: 1rem;
}


/* Utility Colors */
.text-primary-blue {
    color: var(--tph-primary-blue) !important;
}

.bg-primary-blue {
    background-color: var(--tph-primary-blue) !important;
}

.text-accent-blue {
    color: var(--tph-accent-blue) !important;
}

.bg-accent-blue {
    background-color: var(--tph-accent-blue) !important;
}

.bg-light-accent {
    background-color: var(--tph-light-accent) !important;
}

.text-secondary-accent {
    color: var(--tph-secondary-accent) !important;
}

.bg-secondary-accent {
    background-color: var(--tph-secondary-accent) !important;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:active {
    transform: scale(0.98);
}

/* Add active state feedback */

.btn-primary-accent {
    background-color: var(--tph-accent-blue);
    border-color: var(--tph-accent-blue);
    color: var(--tph-white);
}

.btn-primary-accent:hover {
    background-color: #0095cc;
    /* Slightly darker */
    border-color: #0095cc;
    color: var(--tph-white);
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-outline-primary-blue {
    color: var(--tph-primary-blue);
    border-color: var(--tph-primary-blue);
}

.btn-outline-primary-blue:hover {
    background-color: var(--tph-primary-blue);
    color: var(--tph-white);
    box-shadow: var(--soft-shadow);
}

.btn-outline-secondary {
    color: var(--tph-gray);
    border-color: var(--tph-gray);
}

.btn-outline-secondary:hover {
    background-color: var(--tph-gray);
    color: var(--tph-white);
    border-color: var(--tph-gray);
    box-shadow: var(--soft-shadow);
}


/* App-like Cards (Refined) */
.app-card {
    border: none;
    /* Remove default border */
    border-radius: var(--card-border-radius);
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    background-color: var(--tph-white);
    /* Ensure white background */
    will-change: transform, box-shadow;
    /* Optimize for animation */
}

.app-card:hover {
    transform: translateY(-6px);
    /* More pronounced lift */
    box-shadow: var(--hover-shadow);
    border-color: var(--tph-accent-blue);
    /* Highlight border on hover */
}

.card-body {
    padding: 1.5rem;
    /* Increased padding inside card body */
}

.card-body .icon-bg {
    width: 60px;
    /* Slightly larger */
    height: 60px;
    background-color: var(--tph-light-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    /* Increased spacing */
    transition: background-color 0.3s ease;
}

.app-card:hover .icon-bg {
    background-color: #b3e6ff;
    /* More vibrant on hover */
}

.border-dashed {
    border: 2px dashed var(--tph-gray) !important;
    opacity: 0.8;
    /* Slightly less transparent */
    background-color: var(--tph-light-gray) !important;
    /* Match page background */
    display: flex;
    /* Ensure flex properties apply */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.border-dashed:hover {
    opacity: 1;
    border-color: var(--tph-primary-blue);
}

.border-dashed .icon-bg {
    background-color: var(--tph-white) !important;
    /* White background for icon in dashed card */
}


/* List Items (Refined) */
.list-group-flush>.list-group-item {
    border-width: 0 0 1px;
    /* Only bottom border */
    border-color: var(--border-color-light);
}

.list-group-flush>.list-group-item:last-child {
    border-bottom: 0;
    /* Remove bottom border for last item */
}

.app-list-item {
    padding: 1rem 1.5rem;
    /* Increased padding */
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    /* Ensure flex for alignment */
    align-items: center;
}

.app-list-item:hover {
    background-color: var(--tph-light-accent);
    transform: translateX(3px);
    /* Subtle hover effect */
}

.app-list-item i {
    font-size: 1.1rem;
    /* Slightly larger icons */
}

.badge.bg-primary-accent {
    background-color: var(--tph-accent-blue) !important;
    color: var(--tph-white);
    font-weight: 600;
    /* Bolder badge text */
    padding: 0.4em 0.9em;
    /* Adjust badge padding */
    font-size: 0.75rem;
    /* Smaller badge text */
}

.badge.bg-primary-accent i {
    font-size: 0.75rem;
    /* Match badge text size */
}

/* How it works refined */
.step {
    max-width: 120px;
    /* Allow slightly wider steps */
    flex-shrink: 0;
    /* Prevent shrinking */
}

.step .badge {
    background-color: var(--tph-primary-blue) !important;
    /* Use primary blue for steps */
    color: var(--tph-white);
    font-weight: 700;
    min-width: 40px;
    /* Ensure minimum width */
    display: inline-flex;
    /* Align content */
    align-items: center;
    justify-content: center;
}

.step-arrow {
    color: var(--tph-gray);
    font-size: 1.8rem;
    /* Larger arrows */
}

/* Founder Section */
.founder-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    /* Ensure photo covers the circle */
    border: 4px solid var(--tph-white);
    /* White border */
    box-shadow: var(--soft-shadow);
    /* Add shadow to photo */
}

/* Form Styles Refined */
.form-control {
    background-color: var(--input-bg);
    border: 1px solid #ced4da;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, background-color 0.15s ease-in-out;
    font-size: 0.9rem;
    /* Slightly larger font in inputs */
    padding: 0.75rem 1.2rem;
    /* Increased padding */
}

.form-control:focus {
    border-color: var(--tph-accent-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 174, 239, 0.25);
    /* Focus glow */
    background-color: var(--tph-white);
}

.rounded-pill {
    border-radius: 50px !important;
}

.rounded-3 {
    border-radius: 10px !important;
}

/* Consistent moderate rounding */


/* Mobile Bottom Navigation */
.fixed-bottom {
    z-index: 1020;
    border-top: 1px solid var(--border-color-light);
}

.bottom-nav-shadow {
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

/* More pronounced shadow */
.bottom-nav-label {
    font-size: 0.7rem;
    /* Slightly larger label */
    margin-top: 4px;
    /* Increased spacing */
    color: var(--tph-gray);
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link {
    padding: 0.6rem 0.5rem !important;
    /* Adjust padding */
}

.navbar-nav .nav-link i {
    color: var(--tph-gray);
    font-size: 1.5rem;
    /* Slightly larger icons */
    transition: color 0.2s ease;
}

.navbar-nav .nav-link.active .bottom-nav-label,
.navbar-nav .nav-link.active i {
    color: var(--tph-primary-blue);
}

.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link:hover .bottom-nav-label {
    color: var(--tph-primary-blue);
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 85px;
    /* Ensure clearance from bottom nav */
    right: 20px;
    /* Increased distance from edge */
    width: 56px;
    /* Slightly larger */
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1030;
    padding: 0;
    border-radius: 50%;
    /* Ensure round */
    background-color: var(--tph-secondary-accent);
    /* Use secondary accent color */
    border: none;
    color: var(--tph-white);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.2s ease;
    will-change: transform, box-shadow;
    /* Optimize for animation */
}

.fab:hover {
    transform: scale(1.12);
    /* More pronounced lift */
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
    /* Shadow matching accent color */
    background-color: #ff4d4d;
    /* Slightly darker on hover */
}

.fab i {
    font-size: 1.6rem;
    /* Larger icon */
}

/* Footer Inside Panel (Desktop) */
.footer-inside-panel {
    background-color: var(--tph-white);
    /* Match panel background */
    padding: 1.5rem 0;
    /* Increased padding */
    border-top: 1px solid var(--border-color-light);
}

.footer-inside-panel i {
    color: var(--tph-secondary-accent);
    /* Color the heart icon */
}


/* Subtle Entry Animations (Using Animate.css classes) */
/* Added animate__animated class directly in HTML */
/* Added --animate-delay CSS variable in HTML for staggering */

/* Custom Fade-in-Up for sections */
.animate__fadeInUp {
    --animate-duration: 0.6s;
}

/* Custom Zoom-in for cards */
.animate__zoomIn {
    --animate-duration: 0.5s;
}

/* Custom Fade-in for general elements */
.animate__fadeIn {
    --animate-duration: 0.5s;
}

/* Custom Fade-in-Left/Right for about section */
.animate__fadeInLeft,
.animate__fadeInRight {
    --animate-duration: 0.6s;
}

/* Ensure elements are hidden before animation */
.animate__animated {
    visibility: hidden;
}

.animate__animated.animate__fadeInDown,
.animate__animated.animate__fadeInUp,
.animate__animated.animate__zoomIn,
.animate__animated.animate__fadeIn,
.animate__animated.animate__fadeInLeft,
.animate__animated.animate__fadeInRight {
    visibility: visible;
}


/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
        /* Adjust card padding on smaller screens */
    }

    .app-list-item {
        padding: 0.8rem 1rem;
        /* Adjust list item padding */
    }

    .fab {
        bottom: 75px;
        /* Adjust FAB position */
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .fab i {
        font-size: 1.5rem;
    }

    .step {
        max-width: 80px;
        /* Further limit step width on very small screens */
    }

    .step-arrow {
        font-size: 1.5rem;
    }
}