/*
 * ICWeb theme — cms.icweb.com
 *
 * Ported from the static redesign at D:/Work-AI/claude-team/icweb/css/style.css.
 * Two deliberate changes from that source:
 *
 *  1. Colours come from the --hhca-* CSS variables the ThemeService emits, not
 *     from hardcoded hex. That keeps this file in sync with the `icweb` DB theme
 *     so the palette stays editable at /cms-admin/themes without a deploy.
 *  2. A dark mode the original had none of. The CMS ships a dark toggle on every
 *     frontend page, so every surface here needs a [data-theme="dark"] answer.
 *
 * Element selectors are scoped under .icweb-site so they cannot leak into the
 * admin UI or into inherited base-theme blocks that rely on Tailwind's reset.
 */

/* ---------------------------------------------------------------- tokens -- */
:root {
    --icw-primary: var(--hhca-tan, #0066cc);
    --icw-primary-dark: var(--hhca-rust, #004080);
    --icw-secondary: var(--hhca-brown, #003366);
    --icw-accent: var(--hhca-gold, #3399cc);
    --icw-text: var(--hhca-coffee, #334155);
    --icw-text-light: var(--hhca-text-light, #64748b);
    --icw-bg: var(--hhca-panel, #ffffff);
    --icw-bg-alt: var(--hhca-cream, #f0f7fc);
    --icw-border: var(--hhca-border, #d4e6f5);
    --icw-success: var(--hhca-auction-success, #10b981);
    --icw-highlight: #66ccff;
    --icw-hero-gradient: linear-gradient(135deg, #003366 0%, #0066cc 50%, #3399cc 100%);
    --icw-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --icw-card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
    --icw-transition: all 0.3s ease;
}

[data-theme="dark"] {
    --icw-hero-gradient: linear-gradient(135deg, #001a33 0%, #003d7a 50%, #005c99 100%);
    --icw-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --icw-card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------ base -- */
.icweb-site {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--icw-text);
    background-color: var(--icw-bg);
}

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

.icweb-site .icw-section {
    padding: 5rem 0;
}

.icweb-site .icw-section--alt {
    background-color: var(--icw-bg-alt);
}

.icweb-site .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--icw-secondary);
}

.icweb-site .section-subtitle {
    text-align: center;
    color: var(--icw-text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ------------------------------------------------------------------- nav -- */
.icweb-site .navbar {
    background-color: var(--hhca-header-bg, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.icweb-site .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.icweb-site .logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--icw-primary);
    text-decoration: none;
    transition: var(--icw-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.icweb-site .logo:hover { color: var(--icw-primary-dark); }
.icweb-site .logo img { max-height: 44px; width: auto; }

.icweb-site .nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.icweb-site .nav-menu a {
    color: var(--hhca-header-text, #334155);
    text-decoration: none;
    font-weight: 500;
    transition: var(--icw-transition);
    padding: 0.5rem 0;
    position: relative;
}

.icweb-site .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--icw-primary);
    transition: var(--icw-transition);
}

.icweb-site .nav-menu a:hover::after,
.icweb-site .nav-menu a.active::after { width: 100%; }

.icweb-site .nav-menu a:hover,
.icweb-site .nav-menu a.active { color: var(--icw-primary); }

.icweb-site .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icweb-site .icw-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--hhca-header-text, #334155);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--icw-transition);
}

.icweb-site .icw-icon-btn:hover {
    background-color: var(--icw-bg-alt);
    color: var(--icw-primary);
}

.icweb-site .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.icweb-site .mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--hhca-header-text, #334155);
    border-radius: 2px;
    transition: var(--icw-transition);
}

/* ------------------------------------------------------------------ hero -- */
.icweb-site .hero {
    background: var(--icw-hero-gradient);
    color: #ffffff;
    padding: 6rem 0;
    text-align: center;
}

.icweb-site .hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff;
}

.icweb-site .hero .highlight { color: var(--icw-highlight); }

.icweb-site .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.icweb-site .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------- buttons -- */
.icweb-site .icw-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--icw-transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

/* On the gradient bands the buttons invert: white fill, blue text. */
.icweb-site .hero .icw-btn--primary,
.icweb-site .cta-section .icw-btn--primary {
    background-color: #ffffff;
    color: #0066cc;
}

.icweb-site .hero .icw-btn--primary:hover,
.icweb-site .cta-section .icw-btn--primary:hover {
    background-color: var(--icw-bg-alt);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.icweb-site .hero .icw-btn--secondary,
.icweb-site .cta-section .icw-btn--secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.icweb-site .hero .icw-btn--secondary:hover,
.icweb-site .cta-section .icw-btn--secondary:hover {
    background-color: #ffffff;
    color: #0066cc;
    transform: translateY(-2px);
}

/* Off-gradient (on white/alt backgrounds) the buttons take the brand fill. */
.icweb-site .icw-btn--primary {
    background-color: var(--icw-primary);
    color: #ffffff;
}

.icweb-site .icw-btn--primary:hover {
    background-color: var(--icw-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--icw-card-shadow-hover);
}

.icweb-site .icw-btn--secondary {
    background-color: transparent;
    color: var(--icw-primary);
    border-color: var(--icw-primary);
}

.icweb-site .icw-btn--secondary:hover {
    background-color: var(--icw-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* -------------------------------------------------------------- features -- */
.icweb-site .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.icweb-site .feature-card {
    background-color: var(--icw-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--icw-transition);
    box-shadow: var(--icw-card-shadow);
    border: 1px solid transparent;
}

[data-theme="dark"] .icweb-site .feature-card { border-color: var(--icw-border); }

.icweb-site .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--icw-card-shadow-hover);
}

.icweb-site .feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.icweb-site .feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--icw-secondary);
}

.icweb-site .feature-card p {
    color: var(--icw-text-light);
    line-height: 1.6;
}

/* -------------------------------------------------------- rich text body -- */
.icweb-site .icw-prose h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--icw-secondary);
}

.icweb-site .icw-prose h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--icw-secondary);
}

.icweb-site .icw-prose p {
    margin-bottom: 1.5rem;
    color: var(--icw-text-light);
    line-height: 1.8;
}

.icweb-site .icw-prose a {
    color: var(--icw-primary);
    font-weight: 600;
    text-decoration: none;
}

.icweb-site .icw-prose a:hover { color: var(--icw-primary-dark); text-decoration: underline; }

.icweb-site .icw-prose strong { color: var(--icw-text); }

.icweb-site .icw-prose ul {
    list-style: none;
    margin-bottom: 2rem;
    padding: 0;
}

.icweb-site .icw-prose ul li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    color: var(--icw-text);
}

.icweb-site .icw-prose ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--icw-success);
    font-weight: bold;
    font-size: 1.25rem;
}

.icweb-site .icw-prose ol { margin: 0 0 2rem 1.25rem; color: var(--icw-text); }
.icweb-site .icw-prose ol li { padding: 0.35rem 0; }

.icweb-site .icw-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.icweb-site .icw-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* --------------------------------------------------------------- gallery -- */
.icweb-site .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.icweb-site .portfolio-item {
    background-color: var(--icw-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--icw-transition);
    box-shadow: var(--icw-card-shadow);
    border: 1px solid transparent;
}

[data-theme="dark"] .icweb-site .portfolio-item { border-color: var(--icw-border); }

.icweb-site .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--icw-card-shadow-hover);
}

.icweb-site .portfolio-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--icw-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icweb-site .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--icw-transition);
}

.icweb-site .portfolio-item:hover .portfolio-image img { transform: scale(1.05); }

.icweb-site .portfolio-placeholder {
    font-size: 3rem;
    color: var(--icw-primary);
    opacity: 0.5;
}

.icweb-site .portfolio-info { padding: 1.5rem; }

.icweb-site .portfolio-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--icw-secondary);
}

.icweb-site .portfolio-info p {
    color: var(--icw-text-light);
    font-size: 0.95rem;
}

.icweb-site .portfolio-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--icw-primary);
    text-decoration: none;
    font-weight: 600;
}

.icweb-site .portfolio-link:hover { color: var(--icw-primary-dark); }

/* ------------------------------------------------------------------- cta -- */
.icweb-site .cta-section {
    background: var(--icw-hero-gradient);
    color: #ffffff;
    text-align: center;
    padding: 5rem 0;
}

.icweb-site .cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.icweb-site .cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ---------------------------------------------------------------- footer -- */
.icweb-site .footer {
    background-color: var(--hhca-footer-bg, #003366);
    color: var(--hhca-footer-text, #ffffff);
    padding: 3rem 0 1rem;
}

.icweb-site .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.icweb-site .footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--hhca-footer-title-text, #ffffff);
}

.icweb-site .footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--hhca-footer-title-text, #ffffff);
}

.icweb-site .footer-section p { opacity: 0.8; line-height: 1.8; }

.icweb-site .footer-section ul { list-style: none; margin: 0; padding: 0; }
.icweb-site .footer-section ul li { margin-bottom: 0.5rem; }

.icweb-site .footer-section a {
    color: var(--hhca-footer-text, #ffffff);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--icw-transition);
}

.icweb-site .footer-section a:hover { opacity: 1; color: var(--icw-highlight); }

.icweb-site .footer-bottom {
    border-top: 1px solid var(--hhca-footer-border, rgba(255, 255, 255, 0.1));
    padding-top: 1.5rem;
    text-align: center;
    opacity: 0.7;
}

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 968px) {
    .icweb-site .icw-split { grid-template-columns: 1fr; gap: 2rem; }
    .icweb-site .icw-split .icw-split__media { order: -1; }
}

@media (max-width: 768px) {
    .icweb-site .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--hhca-header-bg, #ffffff);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .icweb-site .nav-menu.active { display: flex; }

    .icweb-site .nav-menu li { width: 100%; text-align: center; padding: 0.5rem 0; }

    .icweb-site .mobile-menu-toggle { display: flex; }

    .icweb-site .hero-content h1 { font-size: 2rem; }
    .icweb-site .hero-subtitle { font-size: 1.125rem; }
    .icweb-site .section-title { font-size: 2rem; }
    .icweb-site .features-grid { grid-template-columns: 1fr; }
    .icweb-site .portfolio-grid { grid-template-columns: 1fr; }
    .icweb-site .cta-content h2 { font-size: 1.75rem; }
    .icweb-site .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .icweb-site .hero { padding: 4rem 0; }
    .icweb-site .icw-section { padding: 3rem 0; }
    .icweb-site .cta-buttons { flex-direction: column; }
    .icweb-site .icw-btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .icweb-site .feature-card:hover,
    .icweb-site .portfolio-item:hover,
    .icweb-site .icw-btn:hover { transform: none; }
    .icweb-site .portfolio-item:hover .portfolio-image img { transform: none; }
}
