/* ============================================================
   MAIN.CSS — Global Styles
   Digital Solutions Website | MasterPlan v2.0
   ============================================================ */

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

/* ---- Primary / Accent Utility Classes ---- */
.bg-primary   { background-color: var(--color-primary) !important; }
.bg-accent    { background-color: var(--color-accent)  !important; }
.text-primary { color: var(--color-primary) !important; }
.text-accent  { color: var(--color-accent)  !important; }
.border-primary { border-color: var(--color-primary) !important; }
.border-accent  { border-color: var(--color-accent)  !important; }

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    background-color: var(--color-accent);
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-accent:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* ---- Section Spacing ---- */
.section-py { padding-top: 5rem; padding-bottom: 5rem; }
.section-py-sm { padding-top: 3rem; padding-bottom: 3rem; }

/* ---- Section Title ---- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1.2;
}
@media (min-width: 768px) {
    .section-title { font-size: 2.5rem; }
}

.section-subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 0.75rem;
}

.dark .section-subtitle { color: #9ca3af; }

/* ---- Scroll Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Cards ---- */
.card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}
.dark .card {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
}

/* ---- Form Inputs ---- */
.input-field {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #fff;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.input-field:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1);
}
.dark .input-field {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}
.dark .input-field:focus { border-color: var(--color-primary); }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-primary { background: var(--color-primary); color: #fff; }
.badge-accent  { background: var(--color-accent);  color: #fff; }
.badge-green   { background: #d1fae5; color: #065f46; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-yellow  { background: #fef9c3; color: #854d0e; }

/* ---- Counter animation ---- */
.counter-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-primary);
}
.dark .counter-number { color: #fff; }

/* ---- Testimonials Carousel ---- */
.testimonial-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.dark .testimonial-card { background: #1f2937; }

/* ---- Announcement bar animation ---- */
@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.marquee { animation: marquee 20s linear infinite; white-space: nowrap; }

/* ---- Page transitions ---- */
.page-enter { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Sticky header shadow on scroll ---- */
#main-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.12); }

/* ---- Mobile spacing fix ---- */
@media (max-width: 640px) {
    .section-py { padding-top: 3rem; padding-bottom: 3rem; }
}
