/*
Theme Name: CMB Systems Theme Styles
Description: Main stylesheet for CMB Systems WordPress theme
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --secondary-color: #2d5aa0;
    --accent-color: #f7931e;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* WordPress Core Styles */
.wp-block-image {
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header.scrolled {
    background: rgba(26, 54, 93, 0.95);
    box-shadow: var(--shadow);
}

.header-top {
    background: rgba(0,0,0,0.1);
    padding: 8px 0;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

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

.logo {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(45deg, var(--white), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.cta-btn {
    background: var(--accent-color) !important;
    color: white !important;
    padding: 12px 25px !important;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(247, 147, 30, 0.3);
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(247, 147, 30, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(45deg, white, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    opacity: 0.9;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 25px rgba(247, 147, 30, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(247, 147, 30, 0.4);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.hero-visual {
    position: relative;
}

.hero-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    transform: rotate(-2deg);
    transition: all 0.5s ease;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-list li:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.service-icon {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 12px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-tag {
    background: var(--accent-color);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
    display: inline-block;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 32px;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 25px;
}

.service-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 14px;
}

.service-features li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
}

/* About Section */
.about {
    padding: 100px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text {
    padding-right: 20px;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 25px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    color: var(--text-light);
    font-weight: 600;
    margin-top: 5px;
}

.about-visual {
    position: relative;
}

.about-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.about-image::before {
    content: '🏢';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--primary-color);
    color: white;
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
}

.contact-methods {
    margin-top: 30px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.contact-method-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.contact-method-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-method-info p {
    opacity: 0.8;
}

.contact-form {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

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

.form-submit {
    width: 100%;
    background: var(--accent-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: #e6841a;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #1a202c;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 20px;
}

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

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

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
    display: inline-block;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.6;
}

/* WordPress Content Styles */
.main-content {
    min-height: 60vh;
    padding-bottom: 50px;
}

.single-post,
.single-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.post-header,
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-title,
.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.post-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.post-meta span {
    margin-right: 20px;
}

.post-thumbnail,
.page-thumbnail {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.post-thumbnail img,
.page-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content,
.page-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h2,
.page-content h2 {
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.post-content h3,
.page-content h3 {
    color: var(--secondary-color);
    margin: 25px 0 12px;
}

.post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--bg-light);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tag-list li {
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-dark);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-card .post-thumbnail {
    height: 200px;
    overflow: hidden;
    margin: 0;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card .post-content {
    padding: 25px;
}

.post-card h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-card h2 a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--accent-color);
}

.post-card .post-meta {
    font-size: 12px;
    margin-bottom: 15px;
}

.post-card .post-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* 404 Error Page */
.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-content h1 {
    font-size: 8rem;
    color: var(--accent-color);
    font-weight: 900;
    margin-bottom: 20px;
}

.error-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.search-form {
    max-width: 400px;
    margin: 0 auto;
}

.search-form h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.search-form input[type="search"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--bg-light);
    border-radius: 50px;
    font-size: 16px;
}

.search-form input[type="submit"] {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background: #e6841a;
    transform: translateY(-2px);
}

/* Custom Logo Support */
.custom-logo {
    height: 40px;
    width: auto;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* WordPress Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    padding: 12px 18px;
    background: white;
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* WordPress Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--bg-light);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
}

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

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

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .hero-buttons {
        flex-direction: column;
    }

    .container {
        padding: 0 15px;
    }

    .header-top {
        display: none;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .service-card {
        padding: 25px;
    }

    .single-post,
    .single-page {
        padding: 25px;
        margin: 0 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Loading animations */
.loading-dots::after {
    content: '';
    animation: dots 2s linear infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
