/*
Theme Name: CoreDigital Pro - Redesigned
Theme URI: https://coredigital.com
Author: CoreDigital Team
Author URI: https://coredigital.com
Description: Modern, responsive digital marketing theme with blue and orange design. Optimized for Nigerian businesses.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coredigital
*/

/* ================================
   RESET & BASE STYLES
   ================================ */

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

/* ================================
   COLOR VARIABLES
   Blue Dominant + Orange Accent
   ================================ */

:root {
    /* Primary Blues - Dominant Color */
    --primary: #1e40af;         /* Deep blue for headers, primary buttons */
    --primary-light: #3b82f6;   /* Light blue for hover states */
    --primary-dark: #1e3a8a;    /* Dark blue for depth */
    --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    
    /* Orange Accents - Complementary Color */
    --accent: #f97316;          /* Vibrant orange for CTAs, highlights */
    --accent-light: #fb923c;    /* Light orange for hover */
    --accent-dark: #ea580c;     /* Dark orange for depth */
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    
    /* Mixed Gradient */
    --gradient-mixed: linear-gradient(135deg, #1e40af 0%, #f97316 100%);
    
    /* Text Colors */
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-blue-light: #eff6ff;
    --bg-orange-light: #fff7ed;
    
    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 0;
}

/* ================================
   TYPOGRAPHY
   ================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
}

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

/* ================================
   LAYOUT
   ================================ */

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

.section {
    padding: var(--section-padding);
}

.section-light {
    background: var(--bg-light);
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-white);
}

.section-blue {
    background: var(--bg-blue-light);
}

/* ================================
   HEADER & NAVIGATION
   ================================ */

.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.main-navigation {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--accent);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-white);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.2);
}

/* ================================
   PAGE HEADER (Hero Sections)
   ================================ */

.page-header {
    background: var(--primary-gradient);
    color: var(--text-white);
    text-align: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.1;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ================================
   BLOG STYLES
   ================================ */

.blog-card-modern {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-card-modern img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card-modern:hover img {
    transform: scale(1.05);
}

.blog-card-modern .blog-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    flex-wrap: wrap;
}

.blog-category {
    background: var(--accent);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.blog-card-modern h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-card-modern h3 a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.blog-card-modern h3 a:hover {
    color: var(--accent);
}

.blog-excerpt {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 1rem;
}

/* ================================
   GRID LAYOUTS
   ================================ */

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

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

/* ================================
   CARDS
   ================================ */

.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.12);
    border-color: var(--primary-light);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-blue-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: var(--primary);
}

.card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

/* ================================
   FOOTER
   ================================ */

.site-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widget h4 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--accent);
}

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

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    /* Typography */
    body {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; line-height: 1.3; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Container */
    .container {
        padding: 0 1.25rem;
    }
    
    /* Header */
    .header-container {
        padding: 0 1rem;
        height: 65px;
    }
    
    /* Navigation */
    .main-navigation {
        position: fixed;
        top: 65px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 65px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .main-navigation a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        display: block;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero Section - Mobile Optimized */
    .hero-section,
    .page-header {
        padding: 2.5rem 0 !important;
    }
    
    .hero-section h1,
    .page-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p,
    .page-header p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* CTA Buttons - Mobile */
    .btn,
    .btn-primary,
    .btn-accent,
    .btn-outline,
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        text-align: center;
        display: block;
        margin-bottom: 0.75rem;
    }
    
    /* Grids - All to Single Column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* About/Services 2-column grids */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Sections */
    .section {
        padding: 2.5rem 0 !important;
    }
    
    /* Cards */
    .card {
        padding: 1.75rem;
    }
    
    .card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }
    
    /* Blog Cards */
    .blog-card-modern {
        margin-bottom: 1.5rem;
    }
    
    .blog-card-modern .blog-content {
        padding: 1.5rem !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Trust Indicators - Mobile */
    .hero-section > div > div > div:last-child,
    .page-header > div > div > div:last-child {
        gap: 1.5rem !important;
        font-size: 0.85rem !important;
    }
    
    .hero-section > div > div > div:last-child > div,
    .page-header > div > div > div:last-child > div {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 120px;
    }
    
    .hero-section > div > div > div:last-child > div > div:first-child {
        font-size: 1.75rem !important;
    }
    
    /* Newsletter Popup - Mobile */
    #newsletter-popup > div {
        width: 95% !important;
        max-width: 95%;
    }
    
    #newsletter-popup h3 {
        font-size: 1.5rem !important;
    }
    
    /* Contact Form - Mobile */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Marketing Addons Grid - Mobile */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    
    .card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Hero adjustments */
    .hero-section,
    .page-header {
        padding: 2rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 1.5rem !important;
    }
    
    /* Footer columns stack */
    .footer-widget {
        margin-bottom: 1.5rem;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* ================================
   ANIMATIONS
   ================================ */

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ================================
   ACCESSIBILITY
   ================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    .site-header,
    .site-footer,
    .btn {
        display: none;
    }
}
