/* 7 Wonders Future Cities – Style Sheet */

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

/* ===== Color Palette ===== */
:root {
    --color-primary: #004AAD;
    --color-primary-dark: #003580;
    --color-primary-light: #3377cc;
    --color-accent: #00aaff;
    --color-secondary: #71C6F0;
    --color-bg: #ffffff;
    --color-bg-alt: #F5F5F5;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #dddddd;
    --color-footer-bg: #323944;
    --color-footer-text: #ced5d6;

    /* Typography Scale */
    --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 2.5rem;

    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;
    --space-4xl: 6rem;

    /* Container */
    --container-max: 1200px;
}

/* ===== Base Styles ===== */
html {
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-xl);
}

h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text-light);
}

p {
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

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

ul {
    line-height: 1.9;
    margin-bottom: var(--space-lg);
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

main {
    flex: 1;
}

/* ===== Header ===== */
header {
    background-color: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    max-width: var(--container-max);
    margin: 0 auto;
}

.logo-text {
    margin-left: 0.5rem;
    line-height: 1;
    text-transform: uppercase;
}

@media (max-width: 365px) {
    .logo img {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
}

.logo:hover {
    text-decoration: none;
    color: var(--color-primary);
}

/* ===== Navigation ===== */
nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

nav a {
    color: var(--color-text);
    font-weight: 400;
    font-size: var(--font-size-base);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 0.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
    text-decoration: none;
}

nav a.active {
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
}

/* ===== Mobile Menu (Hamburger) ===== */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: var(--space-xs);
    z-index: 101;
}

.menu-icon span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile styles */
@media (max-width: 47.9375rem) {
    .menu-icon {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-bg);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 100;
        padding-top: 80px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    nav li {
        border-bottom: 1px solid var(--color-border);
    }

    nav a {
        display: block;
        padding: var(--space-lg) var(--space-xl);
        font-size: var(--font-size-lg);
        border-radius: 0;
    }

    nav a:hover {
        background-color: var(--color-bg-alt);
    }

    /* Show menu when checkbox is checked */
    .menu-toggle:checked ~ nav {
        right: 0;
    }

    /* Animate hamburger to X */
    .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 8px);
    }

    .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -8px);
    }

    .menu-toggle ~ nav::before {
        content: '';
        opacity: 0;
        transition: opacity 0.3s ease;
        transition-delay: 0.3s;
    }

    /* Overlay when menu is open */
    .menu-toggle:checked ~ nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 1;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: var(--space-4xl) var(--space-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.img-hero {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.img-hero .container > * {
    z-index: 1;
}

.img-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(23deg, rgba(113, 198, 240, 0.6) 0%, rgba(0, 53, 128, 0.9) 100%);
    pointer-events: none;
}

.hero h1 {
    color: white;
    font-size: var(--font-size-5xl);
    margin-bottom: var(--space-xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
}

.hero p {
    font-size: var(--font-size-xl);
    max-width: 48rem;
    margin: 0 auto var(--space-xl);
    opacity: 0.95;
    line-height: 1.6;
    position: relative;
}

/* ===== Sections ===== */
section {
    padding: var(--space-3xl) var(--space-md);
}

section:nth-child(even) {
    background-color: var(--color-bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

/* ===== Cards & Grid ===== */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card img {
    border-radius: 8px 8px 0 0;
    margin: calc(-1 * var(--space-xl));
    margin-bottom: var(--space-lg);
    min-width: calc(100% + 2 * var(--space-xl));
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* 3:2 aspect ratio (2/3 = 0.6667) */
    object-fit: cover;
    object-position: center;
    position: relative;
}

.card > img {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 3 / 2;
}

.card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
}

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

/* ===== Coming Soon ===== */
.coming-soon {
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.coming-soon h1 {
    margin-bottom: var(--space-lg);
}

.coming-soon p {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
}

/* ===== Footer ===== */
footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: var(--space-2xl) var(--space-md);
    margin-top: auto;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--color-footer-text);
}

.footer-nav a:hover {
    color: var(--color-primary);
}

.footer-copy {
    font-size: var(--font-size-sm);
    color: var(--color-footer-text);
}

/* ===== Responsive Design ===== */

/* Tablet (768px and up) */
@media (min-width: 48rem) {
    :root {
        --font-size-5xl: 4rem;
        --font-size-4xl: 3rem;
        --font-size-3xl: 2.5rem;
        --font-size-2xl: 2rem;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero {
        padding: var(--space-4xl) var(--space-lg);
    }

    section {
        padding: var(--space-4xl) var(--space-lg);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 64rem) {
    :root {
        --font-size-5xl: 4.5rem;
        --font-size-4xl: 3.25rem;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero {
        padding: 6rem var(--space-lg);
    }
}

/* ===== Phases Section ===== */
#phases {
    background: #71C6F0;
    background: linear-gradient(23deg, rgba(113, 198, 240, 0.1) 0%, rgba(0, 53, 128, 0.3) 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) 0 0 0;
}

#phases::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 74, 173, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(113, 198, 240, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

#phases .section-title,
#phases .phases-wrapper {
    position: relative;
    z-index: 1;
}

.phases-wrapper {
    width: calc(100% + 2 * var(--space-lg));
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(-1 * var(--space-lg));
}

.phases-container {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0 var(--space-xl) 0;
    min-width: min-content;
    max-width: 1600px;
    margin: 0 auto;
}

.phase-item {
    position: relative;
    flex-shrink: 0;
    width: 350px;
    max-width: 85vw;
}

.phase-item img {
    -webkit-filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phase-item:hover img {
    transform: translateY(-4px);
    -webkit-filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
}

.phase-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 30%;
    height: 100%;
    transform: translateX(-50%);
    background-image: url("img/arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 1;
    border-radius: 12px;
    pointer-events: none;
    animation: roll-in 3s ease-out infinite;
    opacity: 0;
}

.phase-item:nth-child(2)::after {
    animation-delay: 0.5s;
}

.phase-item:nth-child(3)::after {
    animation-delay: 1s;
}

@keyframes roll-in {
    0%, 10%, 90%, 100% {
        opacity: 0;
        transform: translate(-60%, 0);
        -webkit-filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    }
    50% {
        opacity: 1;
        transform: translate(-50%, 0);
        -webkit-filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
        filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
    }
    90%, 100% {
        transform: translate(-40%, 0);
    }
}

.phase-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Desktop: Show all phases in a row */
@media (min-width: 64rem) {
    .phases-wrapper {
        overflow-x: visible;
    }

    .phases-container {
        justify-content: center;
        flex-wrap: nowrap;
    }

    .phase-item {
        width: 24%;
    }

    .phase-arrow {
        width: 35px;
        margin: 0 var(--space-xs);
    }
}

/* Tablet: Adjust phase sizes */
@media (min-width: 48rem) and (max-width: 63.9375rem) {
    .phase-item {
        width: 300px;
    }

    .phase-arrow {
        width: 38px;
    }
}

/* ===== News Article Styles ===== */
.news-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-meta {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-border);
}

.article-meta time {
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.article-content {
    font-size: var(--font-size-lg);
    line-height: 1.8;
}

.article-content p {
    margin-bottom: var(--space-xl);
}

.article-content blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background-color: var(--color-bg-alt);
    border-left: 4px solid var(--color-primary);
    font-size: var(--font-size-xl);
    font-style: italic;
    line-height: 1.6;
}

.article-content blockquote cite {
    display: block;
    margin-top: var(--space-md);
    font-size: var(--font-size-base);
    font-style: normal;
    font-weight: 600;
    color: var(--color-primary);
}

.article-content blockquote cite::before {
    content: '— ';
}

.article-footer {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 2px solid var(--color-border);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.news-grid {
    display: grid;
    gap: var(--space-2xl);
    grid-template-columns: 1fr;
    margin-top: var(--space-2xl);
}

.news-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card h3 {
    margin-bottom: var(--space-md);
}

.news-card .news-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

.news-card p {
    margin-bottom: var(--space-lg);
}

.news-card .btn {
    display: inline-block;
}

@media (min-width: 48rem) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Form Styles ===== */
.form-container {
    max-width: 600px;
    margin: var(--space-2xl) auto;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.form-container h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--color-primary);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--color-text);
}

.required {
    color: #d32f2f;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.form-group select {
    cursor: pointer;
    background-color: var(--color-bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group button[type="submit"] {
    width: 100%;
    cursor: pointer;
    border: none;
}

/* Honeypot field - hidden from users */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Alert messages */
.alert {
    padding: var(--space-md);
    border-radius: 4px;
    margin-bottom: var(--space-xl);
    font-weight: 500;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

/* ===== Utilities ===== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-lg {
    margin-top: var(--space-lg);
}

.btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--color-secondary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:hover {
    color: white;
    background-color: #ff7700;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.4);
}

.btn-primary {
    background-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

@media (min-width: 48rem) {
    .btn {
        font-size: var(--font-size-base);
        padding: var(--space-sm) var(--space-lg);
    }
}
