/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #fff;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 65px; width: auto; }
.logo-img-dark { display: none; }
.logo-text { font-size: 1.75rem; font-weight: 800; color: #0c4a6e; letter-spacing: -0.5px; }
.logo-sub { font-size: 0.7rem; color: #64748b; letter-spacing: 1px; text-transform: uppercase; }
.main-nav { display: flex; gap: 2.5rem; }
.main-nav a { font-weight: 500; color: #475569; transition: color 0.2s; position: relative; }
.main-nav a:hover { color: #0c4a6e; }
.main-nav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #0c4a6e; transition: width 0.2s; }
.main-nav a:hover::after { width: 100%; }
.header-actions { display: flex; gap: 0.75rem; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: #1a1a2e; margin: 5px 0; transition: 0.3s; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-primary { 
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%); 
    color: #fff; 
    box-shadow: 0 4px 14px rgba(12, 74, 110, 0.35);
}
.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(12, 74, 110, 0.4);
}
.btn-secondary { 
    background: #f1f5f9; 
    color: #0c4a6e; 
    border: 2px solid #e2e8f0;
}
.btn-secondary:hover { 
    background: #e2e8f0; 
    border-color: #cbd5e1;
}
.btn-outline { 
    background: transparent; 
    border: 2px solid #cbd5e1; 
    color: #475569; 
}
.btn-outline:hover { 
    border-color: #0c4a6e; 
    color: #0c4a6e; 
    background: rgba(12, 74, 110, 0.05);
}
.btn-large { padding: 1.1rem 2.25rem; font-size: 1rem; }
.btn-white { background: #fff; color: #0c4a6e; }
.btn-white:hover { background: #f8fafc; transform: translateY(-2px); }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 50%, #0f766e 100%);
    color: #fff;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?w=1920&q=80') center/cover;
    opacity: 0.15;
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 700px; }
.hero h1 { 
    font-size: 3.5rem; 
    font-weight: 800; 
    margin-bottom: 1.5rem; 
    line-height: 1.15;
    letter-spacing: -1px;
}
.hero p { 
    font-size: 1.25rem; 
    opacity: 0.9; 
    margin-bottom: 2.5rem;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Sections */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { 
    font-size: 2.5rem; 
    font-weight: 800; 
    color: #0f172a; 
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.section-header p { color: #64748b; max-width: 600px; margin: 0 auto; font-size: 1.1rem; }
.bg-light { background: #f8fafc; }
.bg-dark { background: #0f172a; color: #fff; }

/* Features Grid - 4 items */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}
.feature-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
}
.feature-card .icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.feature-card .icon img { width: 36px; height: 36px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #0f172a; }
.feature-card p { color: #64748b; font-size: 0.95rem; line-height: 1.7; }

/* Category Grid - 5 items */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}
.category-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}
.category-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.2);
}
.category-card .card-img {
    height: 160px;
    background: linear-gradient(135deg, #0c4a6e, #0f766e);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.category-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}
.category-card .card-img .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.7), transparent);
}
.category-card .card-body { padding: 1.5rem; }
.category-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: #0f172a; }
.category-card p { color: #64748b; font-size: 0.9rem; line-height: 1.6; }

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}
.product-card:hover { 
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
    border-color: #0c4a6e;
}
.product-card h3 { 
    font-size: 1.15rem; 
    margin-bottom: 0.75rem; 
    color: #0f172a;
    font-weight: 700;
}
.product-card p { 
    color: #64748b; 
    font-size: 0.95rem; 
    margin-bottom: 1.25rem;
    line-height: 1.7;
    flex-grow: 1;
}
.product-card .category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e0f2fe, #cffafe);
    color: #0c4a6e;
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 50%, #0f766e 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1920&q=80') center/cover;
    opacity: 0.1;
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 { font-size: 2.25rem; margin-bottom: 1rem; font-weight: 800; }
.cta-section p { opacity: 0.9; margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; font-size: 1.1rem; }

/* Forms */
.form-group { margin-bottom: 1.75rem; }
.form-group label { 
    display: block; 
    font-weight: 600; 
    margin-bottom: 0.6rem; 
    color: #0f172a;
    font-size: 0.95rem;
}
.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fff;
    color: #0f172a;
}
.form-control:focus { 
    outline: none; 
    border-color: #0c4a6e;
    box-shadow: 0 0 0 3px rgba(12, 74, 110, 0.25);
}
.form-control::placeholder { color: #94a3b8; }
textarea.form-control { min-height: 160px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 50%, #0f766e 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?w=1920&q=80') center/cover;
    opacity: 0.12;
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { font-size: 2.75rem; margin-bottom: 0.75rem; font-weight: 800; }
.page-header p { opacity: 0.9; font-size: 1.15rem; }
.page-header a { color: rgba(255,255,255,0.8); }
.page-header a:hover { color: #fff; }

/* Card */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

/* Alert */
.alert { 
    padding: 1.25rem 1.5rem; 
    border-radius: 12px; 
    margin-bottom: 1.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-success { 
    background: linear-gradient(135deg, #d1fae5, #a7f3d0); 
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.alert-error { 
    background: linear-gradient(135deg, #fee2e2, #fecaca); 
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Footer */
.site-footer { 
    background: #0f172a; 
    color: #fff; 
    padding: 80px 0 40px;
}
.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr 1fr; 
    gap: 3rem; 
    margin-bottom: 4rem; 
}
.footer-col h4 { 
    font-size: 1rem; 
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.footer-col p { color: #94a3b8; font-size: 0.95rem; line-height: 1.8; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { color: #94a3b8; font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { 
    border-top: 1px solid #1e293b; 
    padding-top: 2rem; 
    text-align: center; 
    color: #64748b; 
    font-size: 0.9rem; 
}

/* Portal Layout */
.portal-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 80px); }
.portal-sidebar { 
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); 
    padding: 0;
    display: flex;
    flex-direction: column;
}
.portal-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.portal-sidebar-header p {
    color: #64748b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}
.portal-nav {
    flex: 1;
    padding: 0.5rem 0;
}
.portal-sidebar .nav-item { 
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem; 
    color: #94a3b8; 
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.portal-sidebar .nav-item:hover { 
    background: rgba(255,255,255,0.05); 
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}
.portal-sidebar .nav-item.active { 
    background: rgba(255,255,255,0.1); 
    color: #fff;
    border-left-color: #0ea5e9;
}
.portal-sidebar .badge-count {
    background: #16a34a;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: auto;
}
.portal-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.portal-sidebar .logout-link {
    display: block;
    color: #f87171;
    padding: 0.75rem 0 0;
    font-size: 0.85rem;
    border-left: none;
}
.portal-sidebar .logout-link:hover {
    background: transparent;
    color: #fca5a5;
}

/* Portal Mobile Toggle */
.portal-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(12, 74, 110, 0.4);
    z-index: 998;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.portal-mobile-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(12, 74, 110, 0.5);
}
.portal-mobile-toggle i {
    transition: transform 0.3s;
}
.portal-mobile-toggle.open i {
    transform: rotate(90deg);
}
.portal-sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.portal-sidebar-close:hover {
    background: rgba(255,255,255,0.2);
}
@media (max-width: 768px) {
    .portal-sidebar-close {
        display: flex;
    }
}
.portal-content { padding: 3rem; background: #f8fafc; }
.portal-content h1 { font-size: 2rem; margin-bottom: 2rem; color: #0f172a; font-weight: 800; }

/* Stats Grid */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.5rem; 
    margin-bottom: 2.5rem; 
}
.stat-card { 
    background: #fff; 
    padding: 2rem; 
    border-radius: 16px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-value { 
    font-size: 2.5rem; 
    font-weight: 800; 
    background: linear-gradient(135deg, #0c4a6e, #0f766e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card .stat-label { color: #64748b; font-size: 0.95rem; margin-top: 0.25rem; }

/* Data list */
.data-list { display: flex; flex-direction: column; gap: 1rem; }
.data-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.data-item:hover {
    border-color: #0c4a6e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.data-item h3 { font-size: 1rem; color: #0f172a; margin-bottom: 0.25rem; }
.data-item .meta { color: #64748b; font-size: 0.85rem; }

/* Two column section */
.two-col-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.two-col-image img {
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    width: 100%;
    height: 400px;
    object-fit: cover;
}
@media (max-width: 900px) {
    .two-col-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .two-col-image {
        order: -1;
    }
    .two-col-image img {
        height: 300px;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 99;
}
.mobile-menu.active {
    display: block;
}
.mobile-nav {
    display: flex;
    flex-direction: column;
}
.mobile-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    color: #475569;
}
.mobile-nav a:last-child {
    border-bottom: none;
}
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .main-nav { display: none; }
    .header-actions { display: none; }
    .mobile-menu-btn { display: block; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero { padding: 60px 0; }
    section { padding: 50px 0; }
    .section-header h2 { font-size: 1.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .portal-layout { grid-template-columns: 1fr; }
    .portal-sidebar { 
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .portal-sidebar.open {
        display: flex;
        transform: translateX(0);
    }
    .portal-mobile-toggle {
        display: flex !important;
    }
    .portal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .portal-overlay.open {
        display: block;
    }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .container { padding: 0 16px; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .hero { padding: 50px 0; }
    .btn-large { padding: 0.875rem 1.5rem; font-size: 0.9rem; }
    .section-header h2 { font-size: 1.5rem; }
    .card { padding: 1.5rem; }
    .portal-content {
        padding-bottom: 100px; /* Space for floating menu button */
    }
}
