/* =========================================
   ApexCore Infrastructure Group - Main Styles
   ========================================= */

:root {
    --primary-color: #1a252f;
    --secondary-color: #2c3e50;
    --accent-color: #e67e22;
    --accent-hover: #d35400;
    --text-light: #ecf0f1;
    --text-dark: #333333;
    --bg-light: #f4f6f6;
    --bg-white: #ffffff;
    --border-color: #ddd;
    --transition: all 0.3s ease-in-out;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

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

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.typewriter-text {
    color: var(--accent-color);
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--text-light);
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--accent-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-light);
    margin-left: 1rem;
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* =========================================
   Sections General
   ========================================= */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-title p {
    color: #777;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   Stats Section
   ========================================= */
.stats {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* =========================================
   Services Grid (Home & Services)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* =========================================
   Timeline (About)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--bg-white);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after {
    left: -16px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* =========================================
   Accordion (Services)
   ========================================= */
.accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    background-color: var(--bg-white);
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.accordion-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-white);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: #f9f9f9;
}

.accordion-header.active {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
}

.accordion-content p {
    padding: 20px 0;
}

/* =========================================
   Tabs (Support)
   ========================================= */
.tabs-container {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #777;
    transition: var(--transition);
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover, .tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Modals (Vacancies)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 10% auto;
    padding: 40px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: slideDown 0.4s;
}

@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--accent-color);
}

.job-list {
    display: grid;
    gap: 20px;
}

.job-card {
    background: var(--bg-white);
    padding: 25px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   Contact Form
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.map-placeholder {
    background-color: #eee;
    height: 100%;
    min-height: 300px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    padding-left: 5px;
    color: var(--accent-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-icons a:hover {
    background: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

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

    .timeline-item::after {
        left: 15px;
    }

    .timeline-item.right {
        left: 0%;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .job-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
