/* ============================================================
   NEPTUNE ELEVATORS v2.0 — COMPONENTS
   Buttons, Cards, Forms, Badges, Tags, Alerts, Modals
   Premium Industrial Elegance — Tactile Brutalism
   ============================================================ */

/* ----------------------------------------------------------
   BUTTONS
   Sharp geometry, 1px borders, directional shadows
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Button variants */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-primary) 100%);
    color: var(--text-on-dark);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-300) 0%, var(--accent-hover) 100%);
    border-color: transparent;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.btn-primary:active {
    background: var(--accent-active);
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-gold-outline {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--border-gold);
}

.btn-gold-outline:hover {
    background: rgba(0, 147, 204, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 147, 204, 0.15);
    transform: translateY(-2px);
}

/* Button sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
}

/* Button with icon */
.btn-icon {
    padding: var(--space-3);
    aspect-ratio: 1;
}

.btn-icon svg,
.btn-icon i {
    width: 1.125em;
    height: 1.125em;
}

/* Full width */
.btn-block {
    width: 100%;
}

/* ----------------------------------------------------------
   CARDS
   Sharp corners, 1px borders, subtle depth
   ---------------------------------------------------------- */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-default);
    overflow: hidden;
    transition: all var(--duration-slow) var(--ease-out);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    transition: border-color var(--duration-normal) var(--ease-out);
    pointer-events: none;
}

.card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 147, 204, 0.08);
    transform: translateY(-4px);
}

.card:hover::before {
    border-color: var(--border-gold);
}

.card-body {
    padding: var(--space-6);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.card:hover .card-image {
    transform: scale(1.03);
}

/* Card variants */
.card-elevated {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
}

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-default);
}

.card-gold {
    border-color: var(--border-gold);
}

.card-gold:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-gold);
}

/* Horizontal card */
.card-horizontal {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .card-horizontal {
        flex-direction: row;
    }
    .card-horizontal .card-image {
        width: 40%;
        aspect-ratio: auto;
        min-height: 100%;
    }
}

/* ----------------------------------------------------------
   FORMS
   Clean, accessible, sharp styling
   ---------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.form-label-required::after {
    content: ' *';
    color: var(--error);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all var(--duration-normal) var(--ease-out);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--border-default);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-input-error {
    border-color: var(--error);
}

.form-input-error:focus {
    box-shadow: 0 0 0 3px var(--error-bg);
}

.form-error-msg {
    margin-top: var(--space-1-5);
    font-size: var(--text-sm);
    color: var(--error);
}

.form-hint {
    margin-top: var(--space-1-5);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A0A4AC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-10);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Floating label (for contact form) */
.form-floating {
    position: relative;
}

.form-floating .form-input,
.form-floating .form-textarea {
    padding-top: var(--space-5);
    padding-bottom: var(--space-2);
}

.form-floating .form-label {
    position: absolute;
    top: var(--space-3);
    left: var(--space-4);
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: all var(--duration-normal) var(--ease-out);
    pointer-events: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: var(--font-regular);
}

.form-floating .form-input:focus ~ .form-label,
.form-floating .form-input:not(:placeholder-shown) ~ .form-label,
.form-floating .form-textarea:focus ~ .form-label,
.form-floating .form-textarea:not(:placeholder-shown) ~ .form-label {
    top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--accent-primary);
}

/* ----------------------------------------------------------
   BADGES & TAGS
   Small status indicators
   ---------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-0-5) var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.badge-gold {
    background: var(--gold-700);
    color: var(--gold-50);
    border-color: var(--gold-500);
}

.badge-navy {
    background: var(--navy-800);
    color: var(--navy-200);
    border-color: var(--navy-600);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-outline {
    background: transparent;
    border-color: var(--border-default);
    color: var(--text-secondary);
}

/* Tag (larger, clickable) */
.tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1-5) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-default);
    color: var(--text-secondary);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}

.tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-glow);
}

.tag-active {
    background: var(--accent-primary);
    color: var(--text-on-dark);
    border-color: var(--accent-primary);
}

/* ----------------------------------------------------------
   ALERTS
   Status messages with sharp styling
   ---------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border: 1px solid;
    border-radius: var(--radius-default);
    font-size: var(--text-sm);
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #F59E0B;
}

.alert-error {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-info {
    background: var(--info-bg);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.alert-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

/* ----------------------------------------------------------
   MODAL / DIALOG
   Glassmorphism overlay
   ---------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-slow) var(--ease-expo-out);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

/* ----------------------------------------------------------
   PAGINATION
   Clean, minimal
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) var(--ease-out);
}

.pagination-item:hover {
    border-color: var(--border-default);
    color: var(--text-primary);
}

.pagination-item.active {
    background: var(--accent-primary);
    color: var(--text-on-dark);
    border-color: var(--accent-primary);
}

.pagination-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ----------------------------------------------------------
   BREADCRUMB
   Subtle navigation trail
   ---------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    transition: color var(--duration-fast) var(--ease-out);
}

.breadcrumb-item a:hover {
    color: var(--accent-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* ============================================================
   PHOTOGRAPHIC IMAGE TREATMENT
   Consistent, richer color grade for content photography
   (excludes logos/icons which use their own inline SVGs/PNGs)
   ============================================================ */
.hero-bg-img,
.product-card-image img,
.project-card-media img,
.blog-card-image img,
.blog-detail-image,
.gallery-item img,
.about-img,
.product-focus-image,
.page-header-bg img {
    filter: saturate(1.15) contrast(1.05);
}
