/**
 * Custom CSS for WHMCS Template
 * This file contains custom styling overrides and enhancements
 */

/* ===========================
   Custom Color Scheme Variables
   =========================== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* ===========================
   Typography Enhancements
   =========================== */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* ===========================
   Button Enhancements
   =========================== */
.btn {
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* ===========================
   Card Components
   =========================== */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* ===========================
   Form Enhancements
   =========================== */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ===========================
   Navigation Enhancements
   =========================== */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* ===========================
   Responsive Utilities
   =========================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* ===========================
   Accessibility Enhancements
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===========================
   Animation Utilities
   =========================== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===========================
   Homepage Layout Fixes
   =========================== */

/* Reduce excessive whitespace in the hero area */
section#home-banner {
    padding: 36px 0 34px;
}

section#home-banner.with-recaptcha {
    padding-bottom: 54px;
}

section#home-banner h2 {
    padding-bottom: 14px;
}

/* Improve homepage domain-checker captcha layout */
section#home-banner .domainchecker-homepage-captcha {
    margin-top: 12px;
}

section#home-banner .domainchecker-homepage-captcha .captcha-instructions {
    margin: 0 0 8px;
}

section#home-banner .domainchecker-homepage-captcha .captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

section#home-banner .domainchecker-homepage-captcha .captcha-row > [class*="col-"] {
    float: none;
}

section#home-banner .domainchecker-homepage-captcha .captchaimage img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    section#home-banner {
        padding: 28px 0 26px;
    }

    section#home-banner .domainchecker-homepage-captcha .captcha-row {
        flex-direction: column;
    }

    section#home-banner .domainchecker-homepage-captcha .captcha-row > [class*="col-"] {
        width: 100%;
    }
}

/* Restyle homepage shortcut row into clean tiles (homepage only) */
.home-shortcuts {
    background: transparent;
    color: inherit;
    padding: 18px 0 26px;
}

.home-shortcuts .lead {
    line-height: 1.35;
    padding: 12px 0;
    color: var(--secondary-color);
}

.home-shortcuts ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.home-shortcuts li {
    float: none;
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
}

.home-shortcuts li:first-child {
    border-left: 0;
}

.home-shortcuts li a {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 18px 18px;
    min-width: 170px;
    color: inherit;
}

.home-shortcuts li i {
    color: var(--primary-color);
}

.home-shortcuts li p {
    margin: 8px 0 0;
    text-transform: none;
}

.home-shortcuts li span {
    display: inline-block;
    opacity: 0.7;
}

@media (max-width: 767px) {
    .home-shortcuts ul {
        gap: 10px;
    }

    .home-shortcuts li a {
        width: 100%;
        min-width: 0;
    }
}
