/* Alpha Dominion Consulting - Custom Styles */

:root {
    --primary-color: #1e3a5f;      /* Dark navy blue */
    --secondary-color: #6b7280;    /* Neutral gray */
    --dark-color: #1e3a5f;         /* Dark navy blue */
    --light-color: #f0f4f8;        /* Light blue-gray */
}



/* Override Bootstrap colors with dark navy blue */
.btn-primary {
    background-color: #1e3a5f !important;
    border-color: #1e3a5f !important;
}

.btn-primary:hover {
    background-color: #162d4a !important;
    border-color: #162d4a !important;
}

.btn-outline-primary {
    color: #1e3a5f !important;
    border-color: #1e3a5f !important;
}

.btn-outline-primary:hover {
    background-color: #1e3a5f !important;
    border-color: #1e3a5f !important;
    color: white !important;
}

.badge.bg-primary {
    background-color: #1e3a5f !important;
}

.bg-primary {
    background-color: #1e3a5f !important;
}

.text-primary {
    color: #1e3a5f !important;
}

/* Hero gradient with professional blue */
.hero-section {
    background: #1e3a5f !important;
}

/* Navbar with dark navy */
.navbar-dark.bg-dark {
    background-color: #1e3a5f !important;
}

/* Links with dark navy blue */
a {
    color: #1e3a5f;
}

a:hover {
    color: #162d4a;
}

/* Logo Styles */
.navbar-brand img {
    height: 45px;
    width: auto;
    transition: opacity 0.3s ease;
}

.navbar-brand img:hover {
    opacity: 0.8;
}

footer img {
    display: block;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Service Cards with Icons */
.service-card {
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: #1e3a5f;
    box-shadow: 0 8px 20px rgba(30,58,95,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e3a5f;
    border-radius: 50%;
}

.service-icon i {
    font-size: 2.5rem;
    color: white;
}

/* Portfolio Grid */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

/* Blog Post */
.blog-post-card .card-body {
    display: flex;
    flex-direction: column;
}

.blog-post-card .card-text {
    flex-grow: 1;
}

.blog-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Admin Panel Styles */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding: 1rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-header {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
}

/* Stats Cards */
.stat-card {
    background: #1e3a5f;
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

/* Editor Styles */
.editor-toolbar {
    background: var(--light-color);
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
}

.editor-toolbar button {
    margin-right: 0.25rem;
}

/* ============================================
   RESPONSIVE STYLES - Mobile First Approach
   ============================================ */

/* Prevent text size adjustment on orientation change */
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ----------------------------------------
   Extra Small Devices (Phones, < 576px)
   ---------------------------------------- */
@media (max-width: 575.98px) {
    /* Hero Section - Mobile */
    .hero-section {
        padding: 40px 0 !important;
    }

    .hero-section h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem;
    }

    /* Stack hero buttons vertically - smaller and evenly sized */
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 44px;
    }

    .hero-section .btn.btn-lg {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .hero-section .btn + .btn {
        margin-left: 0 !important;
        margin-top: 0.25rem !important;
    }

    /* Ensure outline button matches solid button height */
    .hero-section .btn-outline-light {
        line-height: 1.5;
    }

    /* Section Titles - Mobile */
    .section-title {
        font-size: 1.75rem !important;
    }

    .section-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 2rem;
    }

    /* Service Icons - Smaller on mobile */
    .service-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .service-icon i {
        font-size: 1.75rem !important;
    }

    /* Cards - Tighter padding on mobile */
    .card-body {
        padding: 1rem !important;
    }

    .service-card .card-body {
        padding: 1.25rem !important;
    }

    /* Contact Form - Mobile */
    .contact-form {
        padding: 1.25rem;
    }

    /* Navigation - Mobile */
    .navbar-brand img {
        height: 38px !important;
    }

    /* Footer - Mobile */
    footer {
        text-align: center;
    }

    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }

    footer img {
        margin: 0 auto 1rem auto;
    }

    /* Buttons - Ensure touch-friendly size */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }

    /* Navigation links - Touch-friendly */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Pagination - Touch-friendly */
    .pagination .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    /* Blog cards - Full width images */
    .blog-post-card .card-img-top {
        height: 180px;
    }

    /* Stats cards - Mobile */
    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

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

    /* Alert boxes - Mobile friendly */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Tables - Horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ----------------------------------------
   Small Devices (Landscape phones, 576px - 768px)
   ---------------------------------------- */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2.25rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
    }

    .service-icon i {
        font-size: 2rem;
    }
}

/* ----------------------------------------
   Medium Devices (Tablets, 768px - 992px)
   ---------------------------------------- */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding: 70px 0;
    }

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

    .section-title {
        font-size: 2.25rem;
    }

    /* 2-column layout for services on tablets */
    .services-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ----------------------------------------
   Large Devices (Desktops, 992px+)
   ---------------------------------------- */
@media (min-width: 992px) {
    /* Restore full sizes for desktop */
    .hero-section {
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section p {
        font-size: 1.25rem;
    }
}

/* ----------------------------------------
   Form Input Optimization (All Mobile)
   ---------------------------------------- */
@media (max-width: 767.98px) {
    /* Prevent iOS zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Form labels - Better visibility */
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    /* Larger touch targets for form controls */
    .form-control,
    .form-select {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }

    textarea.form-control {
        min-height: 120px;
    }

    /* Checkbox and radio - Larger touch area */
    .form-check {
        padding-left: 2rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0;
    }
}

/* ----------------------------------------
   Touch Target Optimization
   ---------------------------------------- */
@media (pointer: coarse) {
    /* Devices with touch screens */
    .btn,
    .nav-link,
    .page-link,
    .dropdown-item,
    .list-group-item-action {
        min-height: 44px;
    }

    /* Increase spacing between clickable items */
    .nav-item + .nav-item {
        margin-top: 0.25rem;
    }

    /* Card hover effects - disable on touch */
    .card:hover {
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }
}

/* ----------------------------------------
   Print Styles (Bonus)
   ---------------------------------------- */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .hero-section {
        background: #1e3a5f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        font-size: 12pt;
    }
}

/* Utility Classes */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 3rem;
}

.text-muted-custom {
    color: #6c757d !important;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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