/* ================ ROOT COLOR VARIABLES ================ */
:root {
    --primary-bg: #121212;
    --secondary-bg: #1c1c1c;
    --tertiary-bg: #181818;
    --card-bg: #232323;
    --accent-color: #ff5757;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-radius: 12px;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ================ BASE STYLES ================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================ LEGAL PAGE CONTENT STYLES ================ */
.top-banner {
    background-color: var(--secondary-bg);
    padding: 15px 0;
    color: var(--accent-color);
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255, 87, 87, 0.2);
}

.legal-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

h1,
h2,
h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 600;
}

h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

h2 {
    font-size: 1.8rem;
    margin-top: 30px;
}

h3 {
    font-size: 1.4rem;
    margin-top: 25px;
}

p,
ul,
ol {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

ul,
ol {
    padding-left: 25px;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 10px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #ff8a65;
    text-decoration: underline;
}

.highlight-box {
    background-color: var(--card-bg);
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: var(--box-shadow);
}

.last-updated {
    text-align: right;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    /* Using your primary-bg color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    position: relative;
}

.preloader-logo-container {
    position: relative;
    margin-bottom: 2rem;
    display: inline-block;
}

.preloader-logo {
    height: 80px;
    filter: drop-shadow(0 0 10px rgba(255, 87, 87, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 87, 87, 0.2);
    border-top: 4px solid #ff5757;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1.2s linear infinite;
    position: relative;
}

.preloader-spinner::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-top: 2px solid rgba(255, 87, 87, 0.5);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.preloader-text {
    color: #cccccc;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
    margin-bottom: 1.5rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.preloader-dots {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 8px;
}

.preloader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5757;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.preloader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.preloader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.preloader-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.preloader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 87, 87, 0.2);
    border-radius: 2px;
    margin: 1rem auto;
    overflow: hidden;
}

.preloader-progress-bar {
    height: 100%;
    width: 0%;
    background: #ff5757;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Demo content styles */
.demo-content {
    padding: 40px 20px;
    text-align: center;
    background: #1c1c1c;
    color: white;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

.demo-content h1 {
    color: #ff5757;
    margin-bottom: 20px;
}

.demo-content p {
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #ff5757;
    color: #121212;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 87, 87, 0.3);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: #232323;
    border-radius: 12px;
    padding: 20px;
    width: 200px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.feature-card i {
    font-size: 2rem;
    color: #ff5757;
    margin-bottom: 15px;
}

/* ================ NAVBAR ================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
}

.logo-img {
    height: 30px;
    transition: var(--transition);
}

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

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #ff5757, transparent);
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 87, 87, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-logo:hover {
    transform: translateY(-5px);
}

.footer-logo img {
    height: 65px;
    margin-right: 15px;
    filter: drop-shadow(0 0 8px rgba(255, 87, 87, 0.3));
}

.footer-logo span {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff5757, #ff8a65);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 50px;
}

.social-icon {
    font-size: 1.3rem;
    color: #ff5757;
    /* accent-color */
    transition: all 0.3s ease;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 87, 87, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
    color: #fff;
    background: #ff5757;
    /* accent-color */
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 87, 87, 0.3);
}

.footer-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h5 {
    color: #ff5757;
    /* accent-color */
    margin-bottom: 25px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 12px;
    font-weight: 600;
}

.footer-column h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #ff5757, transparent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.footer-links li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #ff5757;
    /* accent-color */
    font-weight: bold;
    transition: all 0.3s ease;
}

.footer-link {
    color: #cccccc;
    /* text-secondary */
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    position: relative;
}

.footer-link:hover {
    color: #ff5757;
    /* accent-color */
    transform: translateX(5px);
    text-decoration: none;
}

.footer-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ff5757;
    /* accent-color */
}

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    color: #cccccc;
    /* text-secondary */
    transition: all 0.3s ease;
}

.contact-info p:hover {
    color: #fff;
}

.contact-info i {
    margin-right: 12px;
    color: #ff5757;
    /* accent-color */
    min-width: 20px;
    font-size: 1.1rem;
}

.contact-info a {
    color: #cccccc;
    /* text-secondary */
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-info a:hover {
    color: #ff5757;
    /* accent-color */
    text-decoration: none;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 50px 0 30px;
    position: relative;
}

.footer-divider::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #ff5757;
    /* accent-color */
    border-radius: 2px;
}

.copyright {
    text-align: center;
    color: #cccccc;
    /* text-secondary */
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top {
    position: absolute;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background: #ff5757;
    /* accent-color */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 87, 87, 0.3);
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 87, 87, 0.4);
}

/* Newsletter Subscription */
.newsletter {
    background: rgba(255, 87, 87, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    border: 1px solid rgba(255, 87, 87, 0.2);
}

.newsletter h5 {
    color: #ff5757;
    /* accent-color */
    margin-bottom: 15px;
}

.newsletter p {
    color: #cccccc;
    /* text-secondary */
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px 0 0 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
}

.newsletter-input:focus {
    border-color: #ff5757;
    /* accent-color */
}

.newsletter-btn {
    padding: 12px 25px;
    background: #ff5757;
    /* accent-color */
    color: #121212;
    /* primary-bg */
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #ff6b6b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-links-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h5::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links li {
        padding-left: 0;
    }

    .footer-links li::before {
        display: none;
    }

    .back-to-top {
        right: 20px;
        bottom: 20px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-input,
    .newsletter-btn {
        border-radius: 30px;
        width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-links-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h5::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links li {
        padding-left: 0;
    }

    .footer-links li::before {
        display: none;
    }

    .back-to-top {
        right: 20px;
        bottom: 20px;
    }
}

/* ================ ANIMATIONS ================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* ================ RESPONSIVE ADJUSTMENTS ================ */
@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }

    .timeline::before {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero-section {
        text-align: center;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-wrapper {
        flex-direction: column;
    }

    .project-links {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .testimonials-container {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonials-nav {
        gap: 1rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-icon {
        left: 0;
    }

    .certification-grid {
        grid-template-columns: 1fr;
    }

    .badges-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1.5rem;
    }

    .footer-links-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .section {
        padding: 50px 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        gap: 15px;
    }

    .navbar-nav {
        gap: 0;
        margin-bottom: 1rem;
    }

    .nav-link {
        padding: 0.5rem;
    }

    .cta-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .footer {
        padding: 60px 0 30px;
    }

    .social-links {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .cta-stats {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 50px 0 20px;
    }

    .footer-logo {
        margin-bottom: 20px;
    }

    .social-links {
        gap: 15px;
        margin-bottom: 20px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .footer-divider {
        margin: 30px 0;
    }
}