/* ==========================================================================
   AreloLink - Trinidad & Tobago Fixed Link Proposal
   Custom Stylesheet for Blazor WebAssembly
   ========================================================================== */

/* --- Root Variables --- */
:root {
    --primary-color: #0a7c8c;
    --primary-dark: #065661;
    --primary-light: #0d9db0;
    --secondary-color: #f4a261;
    --accent-color: #e76f51;
    --text-dark: #2c3e50;
    --text-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-alt: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style-position: inside;
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.8;
}

.highlight {
    padding: 1.5rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
}

.emphasis {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin: 2rem 0;
}

.section-intro {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* --- Layout --- */
.grain-overlay {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* --- Navigation Bar --- */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-logo {
    font-size: 2rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar-menu.open {
        max-height: 500px;
        padding: 1rem 0;
    }

    .nav-link {
        padding: 1rem 2rem;
        display: block;
    }
}

/* --- Hero Section (Home Page) --- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-light);
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-divider {
    width: 100px;
    height: 3px;
    background: var(--secondary-color);
    margin: 2rem auto;
}

.hero-tagline {
    font-size: 2rem;
    font-family: var(--font-serif);
    font-style: italic;
    margin-bottom: 3rem;
}

.hero-image {
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }
}

/* --- Page Hero (Interior Pages) --- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* --- Content Sections --- */
.content-section {
    padding: 4rem 0;
}

.content-section.alt-bg {
    background: var(--bg-light);
}

.content-section.conclusion {
    background: linear-gradient(to bottom, var(--bg-white), var(--bg-alt));
}

.intro-section {
    padding: 4rem 0;
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
}

.proposal-quote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    padding: 2rem;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 8px;
    margin: 2rem 0;
}

/* --- Grids --- */
.reason-grid,
.info-grid,
.benefits-grid,
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.reason-card,
.info-card,
.benefit-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reason-card:hover,
.info-card:hover,
.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.reason-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* --- Feature List --- */
.feature-list {
    max-width: 700px;
    margin: 2rem auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 1.5rem;
}

/* --- Innovation Grid --- */
.innovation-section {
    background: var(--bg-light);
    padding: 4rem 0;
}

.innovation-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
}

.innovation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.innovation-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.innovation-item h4 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
}

/* --- Comparison Cards --- */
.comparison-section {
    padding: 4rem 0;
    background: var(--bg-alt);
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.comparison-card.highlight-card {
    background: var(--primary-color);
    color: var(--text-light);
    transform: scale(1.05);
}

.comparison-card .cost {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.comparison-card.highlight-card .cost {
    color: var(--text-light);
}

.comparison-card .status {
    font-style: italic;
    opacity: 0.8;
}

.core-question {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 8px;
}

/* --- CTA Cards --- */
.cta-section {
    padding: 4rem 0;
}

.cta-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: var(--text-light);
}

.cta-card h3 {
    margin-bottom: 0.5rem;
}

.cta-card p {
    margin: 0;
    opacity: 0.9;
}

/* --- Transport Comparison --- */
.transport-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.transport-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.transport-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.transport-card ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

.transport-card li {
    margin-bottom: 0.5rem;
}

/* --- Cost Reality Box --- */
.cost-reality {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
    text-align: center;
}

.cost-reality h3 {
    color: var(--text-light);
}

/* --- Solution Points --- */
.solution-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.solution-points {
    max-width: 900px;
    margin: 0 auto;
}

.solution-point {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.point-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.point-content h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.point-content p {
    margin: 0;
    opacity: 0.8;
}

/* --- Component Sections --- */
.component-section {
    margin-bottom: 3rem;
}

.component-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.component-list {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    list-style-position: outside;
    padding-left: 3rem;
}

.component-list li {
    margin-bottom: 1rem;
}

/* --- Tower Grid --- */
.tower-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tower-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tower-card.highlight {
    background: var(--primary-color);
    color: var(--text-light);
}

.tower-card h4 {
    margin-bottom: 1rem;
}

.tower-card.highlight h4 {
    color: var(--text-light);
}

.tower-card ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

.tower-card li {
    margin-bottom: 0.5rem;
}

/* --- Resilience Grid --- */
.resilience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.resilience-grid h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.resilience-grid ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

/* --- Comparison Table --- */
.comparison-table-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.compare-column {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.compare-column.highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--text-light);
}

.compare-column.highlight h3,
.compare-column.highlight strong {
    color: var(--text-light);
}

.pros-cons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.pros-cons ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

.verdict {
    text-align: center;
    margin-top: 2rem;
}

/* --- Timeline --- */
.timeline {
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 5rem;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 0.5rem;
    top: 0;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.timeline-content {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

.timeline-total {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 2rem;
    color: var(--primary-color);
}

/* --- Core Question Box --- */
.core-question-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.next-steps {
    text-align: center;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-light);
}

/* --- Image Placeholder --- */
.image-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder.hero-image {
    min-height: 400px;
}

.image-placeholder.content-image {
    min-height: 350px;
}

.image-placeholder.proposal-diagram {
    min-height: 500px;
}

/* Center actual images when displayed */
img.hero-image,
img.proposal-diagram,
img.content-image {
    display: block;
    margin: 2rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

img.hero-image {
    max-height: 500px;
    object-fit: cover;
}

img.proposal-diagram {
    max-height: 600px;
    object-fit: contain;
}

img.content-image {
    max-height: 500px;
    object-fit: cover;
}

.placeholder-content {
    text-align: center;
    max-width: 600px;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.placeholder-prompt {
    background: var(--bg-white);
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    text-align: left;
}

.placeholder-prompt strong {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}

.placeholder-alt {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

/* --- Footer --- */
.footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.8;
}

.footer-links,
.footer-facts {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-facts li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .page-hero {
        padding: 2rem 1rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    .timeline::before {
        left: 1rem;
    }

    .timeline-marker {
        left: 0;
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .timeline-item {
        padding-left: 3.5rem;
    }

    .solution-point {
        flex-direction: column;
        gap: 1rem;
    }

    .comparison-table-section {
        grid-template-columns: 1fr;
    }
}

/* --- Blazor Error UI --- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--primary-color);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.app-loading svg {
    margin-bottom: 1rem;
}

code {
    color: #c02d76;
}

/* Font Awesome icon helpers */
.fa-circle-check { color: #2e9e4b; }
.fa-circle-xmark { color: #c0392b; }
h3 > .fa-solid, h4 > .fa-solid { margin-right: 0.4em; }
.btn-primary .fa-solid { margin-left: 0.4em; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}