/* =========================================================
   BASE CSS
   Purpose: Global foundation for typography, spacing,
            buttons, and dark-mode defaults.
   Used by: Frontend + Admin_dashboard
========================================================= */

/* ---------------------------------------------------------
   Global Reset & Box Model
--------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------------------
   Root & Body Defaults
--------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Helvetica Neue", Arial, sans-serif;

    font-size: 16px;
    line-height: 1.6;

    background-color: #121212;   /* Dark-mode base */
    color: #e6e6e6;              /* Soft white for readability */

    display: flex;
    flex-direction: column;
}

/* ---------------------------------------------------------
   Typography
--------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.6em;
    color: #ffffff;
}

p {
    margin-bottom: 1em;
    max-width: 70ch; /* Comfortable reading width */
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-header p {
    max-width: none;
}


/* ---------------------------------------------------------
   Containers & Spacing
--------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Vertical spacing helper for sections */
.section {
    padding: 4rem 0;
}

/* ---------------------------------------------------------
   Buttons (Base Styles)
--------------------------------------------------------- */
button,
.btn-primary,
.btn-secondary {
    display: inline-block;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    padding: 0.65rem 1.25rem;
    border-radius: 4px;

    border: none;
    cursor: pointer;

    transition: background-color 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
}

button:active,
.btn-primary:active,
.btn-secondary:active {
    transform: translateY(1px);
}

/* Primary action button */
.btn-primary {
    background-color: #a72d2b; /* Gardiner red */
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #8f2422;
}

/* Secondary / outline-style button */
.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ---------------------------------------------------------
   Forms (Base)
--------------------------------------------------------- */
input,
textarea,
select {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;

    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;

    border-radius: 4px;
    border: 1px solid #444;

    background-color: #1e1e1e;
    color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #a72d2b;
}

/* ---------------------------------------------------------
   Utility Helpers
--------------------------------------------------------- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ---------------------------------------------------------
   Accessibility
--------------------------------------------------------- */
:focus-visible {
    outline: 2px solid #a72d2b;
    outline-offset: 2px;
}

/* ---------------------------------------------------------
   Pagination (Frontend)
--------------------------------------------------------- */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
}

.pagination a {
    display: block;
    padding: 0.5rem 0.9rem;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e6e6e6;
    background: #1e1e1e;
    transition: background 0.2s ease;
}

.pagination a:hover {
    background: #2a2a2a;
}

.pagination a.active {
    background: #a72d2b;
    border-color: #a72d2b;
    color: #fff;
}

/* ---------------------------------------------------------
   Services - Grid
--------------------------------------------------------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ---------------------------------------------------------
   Services - Card
--------------------------------------------------------- */
.service-card {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   Services - Hero
--------------------------------------------------------- */
.service-hero {
    position: relative;
    height: 320px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.service-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.service-hero .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.service-details {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 2rem;
}
