/* ===================================
   Base Styles & Variables
   =================================== */
:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --primary-darker: #15803d;
    --secondary-color: #0b1727;
    --dark-bg: #06111f;
    --dark-card: #0f172a;
    --dark-card-soft: rgba(15, 23, 42, 0.82);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #cbd5e1;
    --border-color: rgba(148, 163, 184, 0.16);
    --border-hover: rgba(34, 197, 94, 0.55);
    --gradient-primary: linear-gradient(135deg, #22c55e, #16a34a);
    --gradient-dark: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 34%), #06111f;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 30px rgba(34, 197, 94, 0.25);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.28);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 18px;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.36);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(34, 197, 94, 0.12);
    color: #fff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 23, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand .logo {
    height: 32px;
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

/* ===================================
   Cards
   =================================== */
.card {
    background: var(--dark-card-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

/* ===================================
   Forms
   =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* ===================================
   Tables
   =================================== */
.table-container {
    overflow-x: auto;
    background: var(--dark-card-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(15, 23, 42, 0.9);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-primary);
}

tr:hover td {
    background: rgba(34, 197, 94, 0.05);
}

/* ===================================
   Badge
   =================================== */
.badge {
    display: inline-block;
    color: var(--primary-color);
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Loading Spinner
   =================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Alerts
   =================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--primary-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* ===================================
   Modal
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Extended footer — 6-column layout (5 categories + links) */
.icp-home-footer {
    background: #0b1727;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 0;
}

.icp-footer-six-col {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(170px, 210px);
    gap: 16px 20px;
    align-items: start;
    padding-top: 8px;
}

.icp-home-footer .footer-categories-col ul {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.icp-home-footer .footer-categories-col li {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.45);
}

.icp-home-footer .footer-categories-col a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    line-height: 1.35;
    text-decoration: none;
}

.icp-home-footer .footer-categories-col a:hover {
    color: #22c55e;
}

.icp-home-footer .icp-footer-side .footer-col h4 {
    color: #22c55e;
    font-size: 0.95rem;
    margin: 0 0 14px;
}

.icp-home-footer .icp-footer-side .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.icp-home-footer .icp-footer-side .footer-col li {
    margin-bottom: 8px;
}

.icp-home-footer .icp-footer-side .footer-col a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    text-decoration: none;
}

.icp-home-footer .icp-footer-side .footer-col a:hover {
    color: #22c55e;
}

.icp-home-footer .icp-footer-side .footer-contact li {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    line-height: 1.55;
}

.icp-footer-nav {
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    padding: 18px 0;
}

.icp-footer-nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.icp-footer-nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    flex-wrap: wrap;
}

.icp-footer-nav-links a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    text-decoration: none;
}

.icp-footer-nav-links a:hover {
    color: #22c55e;
}

.icp-footer-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.icp-footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px 0 24px;
    text-align: center;
}

.icp-footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .icp-footer-six-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===================================
   Extended Footer (icopify.co)
   =================================== */
.footer-extended {
    background: #0b1727;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 48px 0 32px;
}

.footer-categories-title {
    color: #22c55e;
    opacity: 0.85;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 700;
}

.footer-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 8px;
}

.footer-categories-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.footer-categories-col ul li {
    margin-bottom: 6px;
}

.footer-categories-col a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.footer-categories-col a:hover {
    color: #22c55e;
}

.footer-links-grid {
    padding-top: 32px;
}

.footer-contact li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .footer-categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-buttons {
        flex-direction: column;
        margin-top: 16px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}