/*
============================================
Whale Watching Australia - Custom Stylesheet
============================================
*/

/* 1. CSS Variables & Global Settings
--------------------------------------------- */
:root {
    --primary-color: #0d6efd; /* Bootstrap's primary blue for consistency */
    --primary-color-dark: #0a58ca;
    --secondary-color: #6c757d;
    --text-color: #333333;
    --heading-color: #222222;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --border-radius: 0.375rem;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

    --font-family-heading: 'Roboto', sans-serif;
    --font-family-body: 'Lato', sans-serif;
}

/* 2. Base & Typography
--------------------------------------------- */
body {
    font-family: var(--font-family-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.7;
    font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    font-weight: 700;
}

/* Adaptive Typography */
h1, .h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2, .h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h3, .h3 { font-size: clamp(1.4rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

a:hover {
    color: var(--primary-color-dark);
    text-decoration: none;
}

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section-title {
    color: var(--heading-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

/* 3. Global Component Styles
--------------------------------------------- */

/* === Buttons === */
.btn, button, input[type='submit'] {
    font-family: var(--font-family-heading);
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border-width: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-link {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--primary-color-dark);
}

/* === Cards === */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

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

.card-content,
.card-body {
    text-align: center;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    margin-bottom: 1rem;
}

.card-text {
    flex-grow: 1;
}

.card .btn-link {
    margin-top: auto; /* Aligns link to the bottom */
    padding-top: 1rem;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* === Forms === */
.contact-form .form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 4. Section-Specific Styles
--------------------------------------------- */

/* === Header === */
.header .navbar {
    transition: box-shadow 0.3s ease;
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 700;
}

/* === Hero Section === */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    color: var(--white); /* Ensures text is white */
}

.hero-section h1,
.hero-section .lead {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* === Parallax Sections === */
.parallax-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#community .section-title {
    color: var(--white);
}

#community .section-title::after {
    background-color: var(--white);
}


/* === List Group (Resources) === */
.list-group-item {
    transition: background-color 0.3s ease, transform 0.3s ease, border-left-width 0.3s ease;
    border-left: 4px solid transparent;
}

.list-group-item:hover {
    background-color: var(--light-bg);
    transform: translateX(5px);
    border-left: 4px solid var(--primary-color);
}

/* === Footer === */
.footer {
    background-color: var(--heading-color);
    color: rgba(255, 255, 255, 0.7);
}

.footer h6 {
    color: var(--white);
    font-family: var(--font-family-heading);
}

.footer hr {
    background-color: var(--primary-color);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* 5. Static & Special Pages
--------------------------------------------- */

/* === Privacy & Terms Pages === */
.static-page-container {
    padding-top: 100px;
    padding-bottom: 50px;
}

/* === Success Page === */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background-color: var(--light-bg);
}
.success-page h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* 6. Media Queries
--------------------------------------------- */
@media (max-width: 768px) {
    section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .hero-section {
        min-height: 70vh;
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }

    .parallax-section {
        background-attachment: scroll;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }
}