/* =========================================
   CIVILAXIS ENGINEERING HUB
   STYLE.CSS
   Engineering Knowledge Without Limits
========================================= */


/* =========================================
   GOOGLE FONT
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');


/* =========================================
   ROOT VARIABLES
========================================= */

:root {

    --primary-color: #0F172A;
    --secondary-color: #F97316;
    --light-color: #F8FAFC;
    --white-color: #FFFFFF;
    --dark-color: #111827;
    --gray-color: #64748B;
    --border-color: #E2E8F0;

    --transition: 0.3s ease;

    --container-width: 1200px;

}


/* =========================================
   GLOBAL STYLES
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: 'Poppins', sans-serif;
    background: var(--white-color);
    color: var(--dark-color);
    line-height: 1.7;

}

img {
    width: 70%;
    display: block;
    border-radius: 10px;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

.section-padding {
    padding: 100px 8%;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {

    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;

}

.section-title p {

    color: var(--gray-color);
    font-size: 1rem;

}


/* =========================================
   BUTTONS
========================================= */

.btn {

    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);

}

.primary-btn {

    background: var(--secondary-color);
    color: var(--white-color);

}

.primary-btn:hover {

    background: #ea580c;
    transform: translateY(-2px);

}

.secondary-btn {

    border: 2px solid var(--white-color);
    color: var(--white-color);

}

.secondary-btn:hover {

    background: var(--white-color);
    color: var(--primary-color);

}


/* =========================================
   HEADER
========================================= */

.header {

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 8%;

    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);

    z-index: 1000;

}

.logo h2 {

    color: var(--white-color);
    font-size: 1.8rem;
    font-weight: 700;

}

.logo span {

    color: var(--secondary-color);
    font-size: 0.9rem;

}

.nav-links {

    display: flex;
    gap: 30px;

}

.nav-links a {

    color: var(--white-color);
    font-weight: 500;
    transition: var(--transition);

}

.nav-links a:hover {

    color: var(--secondary-color);

}

.nav-actions {

    display: flex;
    align-items: center;
    gap: 15px;

}

.search-btn,
.menu-btn {

    background: transparent;
    border: none;
    color: var(--white-color);
    font-size: 1.2rem;
    cursor: pointer;

}

.menu-btn {
    display: none;
}


/* =========================================
   HERO SECTION
========================================= */

.hero {

    height: 70vh;

    background:
        linear-gradient(rgba(15,23,42,0.8),
        rgba(15,23,42,0.8)),
        url('../images/hero-bg.jpg');

    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    color: var(--white-color);

    position: relative;

}

.hero-content {

    max-width: 850px;
    padding: 10px;

}

.hero-content h1 {

    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.2;

}

.tagline {

    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 600;

}

.hero-text {

    font-size: 1.1rem;
    margin-bottom: 30px;

}

.hero-buttons {

    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;

}


/* =========================================
   CATEGORIES
========================================= */

.categories {

    background: var(--light-color);

}

.categories-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;

}

.category-card {

    background: var(--white-color);
    padding: 40px 30px;
    border-radius: 15px;

    text-align: center;

    transition: var(--transition);

    border: 1px solid var(--border-color);

}

.category-card:hover {

    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

}

.category-card i {

    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;

}

.category-card h3 {

    color: var(--primary-color);
    font-size: 1.2rem;

}


/* =========================================
   ARTICLES
========================================= */

.articles-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;

}

.article-card {

    background: var(--white-color);
    border-radius: 15px;
    overflow: hidden;

    box-shadow: 0 5px 20px rgba(0,0,0,0.08);

    transition: var(--transition);

}

.article-card:hover {

    transform: translateY(-8px);

}

.article-content {

    padding: 25px;

}

.article-category {

    display: inline-block;

    background: rgba(249,115,22,0.1);
    color: var(--secondary-color);

    padding: 5px 12px;
    border-radius: 5px;

    font-size: 0.85rem;
    margin-bottom: 15px;

}

.article-content h3 {

    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3rem;


}

.article-content p {

    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 1.1rem;

}

.read-more {

    color: var(--secondary-color);
    font-weight: 600;

}


/* =========================================
   TOOLS SECTION
========================================= */

.tools {

    background: var(--light-color);

}

.tools-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;

}

.tool-card {

    background: var(--white-color);
    padding: 40px 25px;

    border-radius: 15px;
    text-align: center;

    transition: var(--transition);

}

.tool-card:hover {

    background: var(--primary-color);
    color: var(--white-color);

}

.tool-card i {

    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;

}

.tool-card h3 {

    font-size: 1.1rem;

}


/* =========================================
   PROJECTS SECTION
========================================= */

.projects-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;

}

.project-card {

    border-radius: 15px;
    overflow: hidden;

    background: var(--white-color);

    box-shadow: 0 5px 20px rgba(0,0,0,0.08);

    transition: var(--transition);

}

.project-card:hover {

    transform: translateY(-8px);

}

.project-content {

    padding: 25px;

}

.project-content h3 {

    margin-bottom: 15px;
    color: var(--primary-color);

}


/* =========================================
   ABOUT SECTION
========================================= */

.about {

    background: var(--light-color);

}

.about-container {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
    align-items: center;

}

.about-image img {

    border-radius: 20px;

}

.about-content h2 {

    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);

}

.about-content p {

    margin-bottom: 20px;
    color: var(--gray-color);

}


/* =========================================
   TESTIMONIALS
========================================= */

.testimonial-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;

}

.testimonial-card {

    background: var(--white-color);
    padding: 40px;

    border-radius: 15px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.08);

}

.testimonial-card p {

    font-style: italic;
    margin-bottom: 20px;

}

.testimonial-card h4 {

    color: var(--secondary-color);

}


/* =========================================
   NEWSLETTER
========================================= */

.newsletter {

    background: var(--primary-color);
    color: var(--white-color);

    padding: 80px 8%;
    text-align: center;

}

.newsletter-content {

    max-width: 700px;
    margin: auto;

}

.newsletter-content h2 {

    font-size: 2.5rem;
    margin-bottom: 20px;

}

.newsletter-content p {

    margin-bottom: 30px;

}

.newsletter-form {

    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;

}

.newsletter-form input {

    padding: 15px 20px;
    width: 350px;

    border: none;
    border-radius: 8px;

    font-size: 1rem;

}

.newsletter-form button {

    padding: 15px 30px;

    border: none;
    border-radius: 8px;

    background: var(--secondary-color);
    color: var(--white-color);

    font-weight: 600;
    cursor: pointer;

    transition: var(--transition);

}

.newsletter-form button:hover {

    background: #ea580c;

}


/* =========================================
   FOOTER
========================================= */

.footer {

    background: #020617;
    color: var(--white-color);

    padding-top: 80px;

}

.footer-grid {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 40px;

    padding: 0 8% 60px;

}

.footer-column h3 {

    margin-bottom: 20px;
    color: var(--secondary-color);

}

.footer-column p,
.footer-column a {

    color: #CBD5E1;

}

.footer-column ul li {

    margin-bottom: 12px;

}

.footer-column a:hover {

    color: var(--secondary-color);

}

.social-links {

    display: flex;
    gap: 15px;

}

.social-links a {

    width: 40px;
    height: 40px;

    background: rgba(255,255,255,0.1);

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    transition: var(--transition);

}

.social-links a:hover {

    background: var(--secondary-color);

}

.footer-bottom {

    border-top: 1px solid rgba(255,255,255,0.1);

    text-align: center;
    padding: 25px 8%;

}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media(max-width: 992px) {

    .nav-links {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

}


@media(max-width: 768px) {

    .section-padding {
        padding: 80px 5%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .newsletter-form input {
        width: 100%;
    }

}


@media(max-width: 576px) {

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .btn {
        width: 100%;
    }

}

/* =========================================
   RESPONSIVE MOBILE LAYOUT
   Add this BELOW your existing style.css
========================================= */


/* =========================================
   MOBILE NAVIGATION MENU
========================================= */

.mobile-menu {

    position: fixed;
    top: 0;
    right: -100%;

    width: 280px;
    height: 100vh;

    background: #0F172A;

    padding: 100px 30px;

    z-index: 2000;

    transition: 0.4s ease;

    display: flex;
    flex-direction: column;
    gap: 25px;

}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {

    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 500;

    transition: 0.3s ease;

}

.mobile-menu a:hover {
    color: #F97316;
}

.mobile-close {

    position: absolute;
    top: 30px;
    right: 30px;

    font-size: 1.5rem;
    color: #FFFFFF;

    cursor: pointer;

}


/* =========================================
   MOBILE OVERLAY
========================================= */

.mobile-overlay {

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100vh;

    background: rgba(0,0,0,0.6);

    z-index: 1500;

    opacity: 0;
    visibility: hidden;

    transition: 0.3s ease;

}

.mobile-overlay.active {

    opacity: 1;
    visibility: visible;

}


/* =========================================
   LARGE TABLETS
========================================= */

@media (max-width: 1200px) {

    .hero-content h1 {
        font-size: 3.5rem;
    }

}


/* =========================================
   TABLETS
========================================= */

@media (max-width: 992px) {

    /* HEADER */

    .header {

        padding: 18px 5%;

    }

    .nav-links {

        display: none;

    }

    .menu-btn {

        display: block;

    }

    .logo h2 {

        font-size: 1.6rem;

    }

    /* HERO */

    .hero {

        height: auto;
        min-height: 100vh;

        padding: 140px 5% 100px;

    }

    .hero-content h1 {

        font-size: 3rem;

    }

    .hero-text {

        font-size: 1rem;

    }

    /* SECTIONS */

    .section-padding {

        padding: 80px 5%;

    }

    .section-title h2 {

        font-size: 2.2rem;

    }

    /* ABOUT SECTION */

    .about-container {

        grid-template-columns: 1fr;

    }

    /* PROJECT GRID */

    .projects-grid {

        grid-template-columns: 1fr;

    }

}


/* =========================================
   MOBILE DEVICES
========================================= */

@media (max-width: 768px) {

    /* GLOBAL */

    body {

        overflow-x: hidden;

    }

    /* HERO */

    .hero-content {

        width: 100%;

    }

    .hero-content h1 {

        font-size: 2.4rem;
        line-height: 1.3;

    }

    .tagline {

        font-size: 1.1rem;

    }

    .hero-text {

        font-size: 0.95rem;

    }

    .hero-buttons {

        flex-direction: column;
        align-items: center;

    }

    .btn {

        width: 100%;
        max-width: 300px;

        text-align: center;

    }

    /* SECTION TITLES */

    .section-title {

        margin-bottom: 40px;

    }

    .section-title h2 {

        font-size: 2rem;

    }

    .section-title p {

        font-size: 0.95rem;

    }

    /* GRID LAYOUTS */

    .categories-grid,
    .articles-grid,
    .tools-grid,
    .projects-grid,
    .testimonial-grid,
    .footer-grid {

        grid-template-columns: 1fr;

    }

    /* CARDS */

    .category-card,
    .tool-card,
    .testimonial-card {

        padding: 30px 20px;

    }

    /* ARTICLE IMAGE */

    .article-card img {

        height: 220px;
        object-fit: cover;

    }

    /* PROJECT IMAGE */

    .project-card img {

        height: 250px;
        object-fit: cover;

    }

    /* NEWSLETTER */

    .newsletter {

        padding: 60px 5%;

    }

    .newsletter-content h2 {

        font-size: 2rem;

    }

    .newsletter-form {

        flex-direction: column;

    }

    .newsletter-form input {

        width: 100%;

    }

    .newsletter-form button {

        width: 100%;

    }

    /* FOOTER */

    .footer-grid {

        gap: 30px;

    }

}


/* =========================================
   SMALL MOBILE DEVICES
========================================= */

@media (max-width: 576px) {

    /* HEADER */

    .header {

        padding: 15px 4%;

    }

    .logo h2 {

        font-size: 1.4rem;

    }

    .logo span {

        font-size: 0.75rem;

    }

    /* HERO */

    .hero {

        padding-top: 120px;

    }

    .hero-content h1 {

        font-size: 2rem;

    }

    .tagline {

        font-size: 1rem;

    }

    .hero-text {

        font-size: 0.9rem;

    }

    /* SECTION */

    .section-padding {

        padding: 70px 4%;

    }

    .section-title h2 {

        font-size: 1.8rem;

    }

    /* CATEGORY ICONS */

    .category-card i,
    .tool-card i {

        font-size: 2.5rem;

    }

    /* ABOUT */

    .about-content h2 {

        font-size: 2rem;

    }

    /* NEWSLETTER */

    .newsletter-content h2 {

        font-size: 1.8rem;

    }

    /* FOOTER */

    .footer {

        text-align: center;

    }

    .social-links {

        justify-content: center;

    }

}


/* =========================================
   EXTRA SMALL DEVICES
========================================= */

@media (max-width: 400px) {

    .hero-content h1 {

        font-size: 1.7rem;

    }

    .section-title h2 {

        font-size: 1.5rem;

    }

    .btn {

        padding: 12px 20px;

    }

}


/* =========================================
   IMAGE RESPONSIVENESS
========================================= */

img {

    max-width: 100%;
    height: auto;

}


/* =========================================
   RESPONSIVE TABLES
========================================= */

.table-responsive {

    overflow-x: auto;
    width: 100%;

}


/* =========================================
   RESPONSIVE VIDEOS
========================================= */

.video-container {

    position: relative;
    width: 100%;
    padding-bottom: 56.25%;

    overflow: hidden;

}

.video-container iframe,
.video-container video {

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

}


/* =========================================
   TOUCH FRIENDLY BUTTONS
========================================= */

button,
.btn,
a {

    min-height: 44px;

}


/* =========================================
   MOBILE ANIMATIONS
========================================= */

@media (prefers-reduced-motion: reduce) {

    * {

        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;

    }

}