/* ====================================
   eCertSecure Holding Page Styles
   ==================================== */

/* ====================================
   CSS Variables - Brand Colors
   ==================================== */
:root {
    /* Brand Colors */
    --color-primary: #19243E;        /* Dark Navy */
    --color-secondary: #0075BF;      /* Blue */
    --color-accent: #22B9D8;         /* Light Blue */
    --color-white: #FFFFFF;

    /* Shades */
    --color-primary-light: #2a3551;
    --color-primary-dark: #0d1221;
    --color-secondary-light: #1a8dd4;
    --color-secondary-dark: #005a94;
    --color-accent-light: #42c7e3;
    --color-accent-dark: #1a93ad;

    /* Neutral Colors */
    --color-gray-100: #F7F9FC;
    --color-gray-200: #E5E9F2;
    --color-gray-300: #CBD2E0;
    --color-gray-400: #9AA5B9;
    --color-gray-500: #6B7A94;
    --color-gray-600: #4A5568;
    --color-gray-700: #2D3748;
    --color-gray-800: #1A202C;

    /* Typography */
    --font-primary: 'DM Sans', Arial, sans-serif;
    --font-secondary: Arial, sans-serif;

    /* Font Weights */
    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 700;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ====================================
   CSS Reset & Base Styles
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-regular);
    line-height: 1.6;
    color: var(--color-gray-700);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================
   Typography
   ==================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-medium);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--font-medium);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: var(--font-medium);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-gray-600);
}

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

a:hover {
    color: var(--color-secondary-dark);
}

ul {
    list-style: none;
}

/* ====================================
   Utility Classes
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--color-primary);
}

/* ====================================
   Buttons
   ==================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    font-size: 1rem;
    text-align: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}

.btn-primary:hover {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
}

/* ====================================
   Header
   ==================================== */
.header {
    background-color: var(--color-primary);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.logo-image {
    height: 50px;
    width: auto;
}

@media (min-width: 768px) {
    .logo-image {
        height: 60px;
    }
}

/* Header inner layout and navigation */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--color-white);
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    padding: 0.25rem 0.5rem;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--color-accent-light);
}

/* Remove the visible focus rectangle on mouse click while preserving
   keyboard accessibility. Use :focus-visible to show an outline only
   when navigation is focused via keyboard. */
.main-nav a:focus {
    outline: none;
    box-shadow: none;
}

.main-nav a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ====================================
   Hero Section
   ==================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.hero-title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-medium);
}

/* Keep the hero title on one line for the Contact page */
body.contact-page .hero-title {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}

.hero-subtitle {
    font-size: clamp(0.875rem, 2vw, 1rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-regular);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
    color: var(--color-gray-200);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

/* ====================================
   Trust Banner
   ==================================== */
.trust-banner {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.trust-title {
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.trust-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--color-white);
    margin-bottom: 0;
}

/* ====================================
   Features Section
   ==================================== */
.features {
    padding: var(--spacing-3xl) 0;
    background-color: var(--color-gray-100);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

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

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

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

.feature-icon {
    margin-bottom: var(--spacing-md);
}

.feature-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.feature-description {
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-md);
}

.feature-benefits {
    list-style: none;
    padding: 0;
}

.feature-benefits li {
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    position: relative;
    color: var(--color-gray-600);
}

.feature-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: var(--font-bold);
}

/* ====================================
   Benefits Section
   ==================================== */
.benefits {
    padding: var(--spacing-3xl) 0;
    background-color: var(--color-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

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

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* First 3 cards span 2 columns each */
    .benefit-card:nth-child(1),
    .benefit-card:nth-child(2),
    .benefit-card:nth-child(3) {
        grid-column: span 2;
    }

    /* Last 2 cards: leave 1 column gap on left, span 2 columns each */
    .benefit-card:nth-child(4) {
        grid-column: 2 / 4;
    }

    .benefit-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.benefit-card {
    background-color: var(--color-gray-100);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-secondary);
    transition: all var(--transition-base);
}

.benefit-card:hover {
    border-left-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.benefit-title {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.benefit-card p {
    color: var(--color-gray-600);
    margin-bottom: 0;
}

/* ====================================
   How It Works Section
   ==================================== */
.how-it-works {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
}

.how-it-works .section-title {
    color: var(--color-white);
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

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

@media (min-width: 1024px) {
    .steps {
        grid-template-columns: repeat(5, 1fr);
    }
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-lg);
}

.step-title {
    color: var(--color-white);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.step p {
    color: var(--color-gray-200);
    font-size: 0.9375rem;
}

/* ====================================
   Perfect For Section
   ==================================== */
.perfect-for {
    padding: var(--spacing-3xl) 0;
    background-color: var(--color-gray-100);
}

.audience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

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

@media (min-width: 1024px) {
    .audience-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* First 3 cards span 2 columns each */
    .audience-card:nth-child(1),
    .audience-card:nth-child(2),
    .audience-card:nth-child(3) {
        grid-column: span 2;
    }

    /* Last 2 cards: leave 1 column gap on left, span 2 columns each */
    .audience-card:nth-child(4) {
        grid-column: 2 / 4;
    }

    .audience-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.audience-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.audience-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--color-accent);
}

.check-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    line-height: 50px;
    margin-bottom: var(--spacing-md);
}

.audience-card h3 {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.audience-card p {
    color: var(--color-gray-600);
    margin-bottom: 0;
}

/* ====================================
   CTA Section
   ==================================== */
.cta {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-white);
    text-align: center;
}

.cta-title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

/* Reduce CTA title size on Contact page only so it fits on one line */
body.contact-page .cta-title {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.15;
}

.cta-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    color: var(--color-white);
    line-height: 1.8;
}

.cta-buttons {
    margin-bottom: var(--spacing-md);
}

.cta-buttons .btn-large {
    background-color: var(--color-white);
    color: var(--color-secondary);
    border-color: var(--color-white);
}

.cta-buttons .btn-large:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.cta-note {
    color: var(--color-white);
    font-style: italic;
    margin-top: var(--spacing-md);
    opacity: 0.9;
}

/* ====================================
   Footer
   ==================================== */
.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-logo-image {
    height: 40px;
    width: auto;
}

.footer-info p {
    color: var(--color-gray-300);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 767px) {
    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .features,
    .benefits,
    .how-it-works,
    .perfect-for,
    .cta {
        padding: var(--spacing-xl) 0;
    }
}

/* ====================================
   Animations
   ==================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add subtle animation on page load */
.hero,
.features,
.benefits,
.how-it-works,
.perfect-for,
.cta {
    animation: fadeInUp 0.8s ease-out;
}

/* ====================================
   Print Styles
   ==================================== */
@media print {
    .header,
    .footer {
        display: none;
    }

    body {
        color: #000;
    }

    a {
        text-decoration: underline;
    }
}

/* ====================================
   Accessibility
   ==================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
