/* Frontend component styles — plain-CSS build of resources/css/app.css
   @layer components (frontend palette: green primary + gold accents).
   Loaded by layouts/app.blade.php alongside CDN Tailwind. */

/* ---- base extras ---- */
html {
    scroll-behavior: smooth;
}

::selection {
    background-color: #c8a951;
    color: #0f172a;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c8a951;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

/* ---- buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: #14532d;
    color: #ffffff;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #166534;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #22c55e;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: #ffffff;
    color: #14532d;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 2px solid #14532d;
    transition: all 0.3s ease-in-out;
}

.btn-secondary:hover {
    background-color: #14532d;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #22c55e;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: #c8a951;
    color: #14532d;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease-in-out;
}

.btn-gold:hover {
    background-color: #d1b45f;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-gold:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #d1b45f;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

/* ---- layout helpers ---- */
.section-padding {
    padding: 4rem 1rem;
}

@media (min-width: 640px) {
    .section-padding {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.container-custom {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---- cards ---- */
.card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ---- forms ---- */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #111827;
    transition: all 0.3s ease-in-out;
}

.input-field::placeholder {
    color: #9ca3af;
}

.input-field:focus {
    outline: none;
    box-shadow: 0 0 0 2px #22c55e;
    border-color: #22c55e;
}

.input-error {
    border-color: #ef4444;
}

.input-error:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ef4444;
    border-color: #ef4444;
}

.label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ---- badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: #dcfce7;
    color: #166534;
}

.badge-gold {
    background-color: #f5edd6;
    color: #6f5a28;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* ---- misc ---- */
.divider {
    width: 4rem;
    height: 0.25rem;
    background-color: #c8a951;
}

.divider-center {
    width: 4rem;
    height: 0.25rem;
    background-color: #c8a951;
    margin-left: auto;
    margin-right: auto;
}

.text-gradient {
    background-image: linear-gradient(to right, #166534, #16a34a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

.overlay-gradient {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
}

/* ===== Mobile polish ===== */
@media (max-width: 767.98px) {
    /* Prevent iOS Safari auto-zoom on form focus */
    input,
    select,
    textarea {
        font-size: 16px !important;
        line-height: 1.45;
    }

    /* Comfortable tap targets for text links */
    main a:not(.btn-primary):not(.btn-secondary):not(.btn-gold) {
        touch-action: manipulation;
    }
}

/* Long unbroken strings (emails, URLs) never force horizontal scroll */
.card,
[class*="rounded-2xl"],
[class*="rounded-3xl"] {
    min-width: 0;
}

/* ===== Rich-text (editor) content styling =====
   The tailwindcss/typography plugin is not active on the CDN build,
   so 'prose' utility classes are no-ops. These rules provide the
   editorial styles that services/news/careers/project descriptions expect. */
[class*="prose"] {
    font-size: 1rem;
    line-height: 1.75;
}

[class*="prose"] > * + * {
    margin-top: 1em;
}

[class*="prose"] p {
    line-height: 1.75;
}

[class*="prose"] h2,
[class*="prose"] h3,
[class*="prose"] h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 1.6em;
}

[class*="prose"] h2 { font-size: 1.4em; }
[class*="prose"] h3 { font-size: 1.2em; }
[class*="prose"] h4 { font-size: 1.05em; }

[class*="prose"] ul,
[class*="prose"] ol {
    padding-left: 1.35em;
    margin-top: 1em;
}

[class*="prose"] ul { list-style: disc; }
[class*="prose"] ol { list-style: decimal; }

[class*="prose"] li {
    margin-top: 0.4em;
    line-height: 1.7;
}

[class*="prose"] li::marker {
    color: #16a34a;
}

[class*="prose"] img {
    border-radius: 0.75rem;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    height: auto;
}

[class*="prose"] a {
    color: #16a34a;
    text-decoration: underline;
}

[class*="prose"] strong {
    font-weight: 700;
    color: #0f172a;
}

[class*="prose"] blockquote {
    border-left: 3px solid #22c55e;
    padding-left: 1em;
    color: #475569;
    font-style: italic;
}

[class*="prose"] table {
    display: block;
    width: 100%;
    overflow-x: auto;
    font-size: 0.9em;
    border-collapse: collapse;
}

[class*="prose"] td,
[class*="prose"] th {
    border: 1px solid #e2e8f0;
    padding: 0.5em 0.75em;
}
