/* ============================================================
   GREENWICH & LONDON EXPLORER - MAIN STYLESHEET
   Student: STU231162
   Module: COM4014 - Introduction to Web Authoring
   ============================================================ */

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY & PAGE CONTAINER */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* NAVIGATION */
.navbar {
    display: flex;
    justify-content: center;
    background-color: #1a365d;
    padding: 0;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar a {
    color: white;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: block;
}

.navbar a:hover {
    background-color: #2c5282;
}

.navbar a.active {
    background-color: #ed8936;
    color: #1a365d;
    font-weight: 700;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* HERO SECTION */
.hero-full {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    padding: 60px 40px 40px;
    color: white;
}

.hero-overlay h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-overlay p {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.hero-sub {
    font-size: 1em;
    opacity: 0.85;
}

/* INTRO SECTION */
.intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.intro h2 {
    color: #1e3a5f;
    font-size: 2em;
    margin-bottom: 15px;
}

.intro p {
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* FEATURE PAIR SECTION */
.feature-pair {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature-item {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.feature-text {
    padding: 25px;
}

.feature-text h2 {
    color: #1e3a5f;
    font-size: 1.5em;
    margin-bottom: 8px;
}

.feature-text h3 {
    color: #c05621;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.feature-text p {
    color: #555;
    margin-bottom: 8px;
}

/* CARD SECTION */
.card-section {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.card {
    background: white;
    width: 320px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card h3 {
    color: #1e3a5f;
    padding: 20px 20px 10px;
    font-size: 1.3em;
}

.card p {
    padding: 0 20px 20px;
    color: #555;
    font-size: 0.95em;
}

/* CONTENT SECTIONS */
.section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section h2 {
    color: #1e3a5f;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 3px solid #ed8936;
    padding-bottom: 10px;
}

.section h3 {
    color: #2c5282;
    font-size: 1.3em;
    margin: 20px 0 10px;
}

.section p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

.section ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.section ul li {
    margin-bottom: 8px;
    color: #555;
}

/* GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 15px;
    font-size: 0.9em;
}

/* TABLE STYLES */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table th {
    background: #1e3a5f;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* FORM STYLES */
.form-section {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.form-group,
fieldset.form-group {
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

fieldset.form-group legend {
    display: block;
    margin-bottom: 8px;
    color: #1e3a5f;
    font-weight: 600;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1e3a5f;
    font-weight: 600;
}

.form-group label span {
    color: #742a2a;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #2c5282;
    outline: none;
}

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

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: auto;
}

.submit-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 30px auto 0;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.4);
}

/* FOOTER */
.footer {
    background-color: #1a365d;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.footer .navbar {
    background: transparent;
    margin-bottom: 20px;
    box-shadow: none;
}

.footer .navbar a {
    padding: 10px 20px;
    font-size: 0.9em;
}

.footer .navbar a:hover {
    background-color: rgba(255,255,255,0.1);
}

.footer p {
    opacity: 0.8;
    font-size: 0.9em;
    margin-top: 15px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .hero-overlay h1 {
        font-size: 2em;
    }

    .hero-full {
        height: 350px;
    }

    .feature-pair {
        flex-direction: column;
    }

    .navbar a {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .card {
        width: 100%;
    }

    .main-content {
        padding: 15px;
    }

    .form-section {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    .hero-overlay {
        padding: 30px 20px 20px;
    }

    .hero-overlay h1 {
        font-size: 1.5em;
    }

    .navbar {
        flex-direction: column;
    }

    .navbar a {
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* ACCESSIBILITY */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1e3a5f;
    color: white;
    padding: 10px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: more) {
    .header, .footer, .navbar {
        background: #000;
    }

    .card, .section, .feature-item {
        border: 2px solid #000;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
