/*
 * Custom styles for MyWebApp
 * -----------------------------------------------------------
 * This stylesheet replaces Tailwind CSS and implements all styling
 * including custom colors, responsiveness, and component styles.
 *
 * FIX: Added 'appearance: none' to the submit button to remove
 * native browser styling and ensure a modern look.
 * ENHANCEMENT: Added styles for home.html (.hero-section) and
 * legal.html (.legal-document) pages.
 */

:root {
    /* Custom Color Palette based on #432689 */
    --primary-color: #432689;
    --primary-light: #5e43a3;
    --secondary-color: #e9e3f6;
    --text-color: #374151; /* gray-700 */
    --background-light: #f3f4f6; /* gray-100 */
    --light-gray: #6b7280; /* A slightly lighter gray for descriptions */
    --dark-text: #1f2937; /* Used for headings, gray-900 equivalent */
}

/* Global Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    line-height: 1.5;
}

/* Container for Centering and Padding */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Small screens (sm:px-6) */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Large screens (lg:px-8) */
@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* --- Header Styling --- */
.app-header {
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-lg */
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.app-logo {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 800; /* font-extrabold */
    color: var(--primary-color);
    letter-spacing: -0.05em; /* tracking-tight */
    transition: opacity 0.2s ease-in-out;
}

.app-logo:hover {
    opacity: 0.9;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 1rem; /* space-x-4 */
}

.nav-link {
    color: var(--text-color);
    font-weight: 500; /* font-medium */
    transition: color 0.2s ease-in-out;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary-light);
}

/* Responsive navigation links (hidden md:inline) */
.nav-link-desktop {
    display: none;
}

@media (min-width: 768px) { /* md breakpoint */
    .nav-link-desktop {
        display: inline;
    }
}

/* --- Main Content Styling --- */
.app-main {
    flex-grow: 1; /* flex-grow */
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .app-main {
        padding-top: 3rem; /* md:py-12 */
        padding-bottom: 3rem;
    }
}

/* Messages */
.message-container {
    margin-bottom: 1.5rem;
    max-width: 42rem; /* max-w-4xl */
    margin-left: auto;
    margin-right: auto;
}

.message-box {
    padding: 1rem;
    border-radius: 0.75rem; /* rounded-xl */
    font-size: 0.875rem; /* text-sm */
    margin-bottom: 0.5rem;
    font-weight: 600; /* font-semibold */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); /* shadow-md */
    border-width: 1px;
}

.message-success {
    background-color: #d1fae5; /* bg-green-100 */
    color: #065f46; /* text-green-800 */
    border-color: #a7f3d0; /* border-green-300 */
}
.message-error {
    background-color: #fee2e2; /* bg-red-100 */
    color: #991b1b; /* text-red-800 */
    border-color: #fca5a5; /* border-red-300 */
}
.message-info {
    background-color: #dbeafe; /* bg-blue-100 */
    color: #1e40af; /* text-blue-800 */
    border-color: #93c5fd; /* border-blue-300 */
}


/* --- Footer Styling --- */
.app-footer {
    background-color: var(--primary-color);
    color: #fff;
    margin-top: auto;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); /* shadow-inner */
}

.footer-content {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-link:hover {
    color: var(--secondary-color);
}

/* --- Input Focus Styling (From previous request) --- */

/* Target form elements with high specificity */
input[type='text'],
input[type='email'],
input[type='number'],
textarea {
    transition: all 0.2s ease-in-out !important;
    border-color: #d1d5db !important;
    border-width: 1px !important;
    border-radius: 0.5rem !important;
    box-shadow: none !important;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='number']:focus,
textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(67, 38, 137, 0.4) !important;
    background-color: #ffffff !important;
    outline: none !important;
}


/* --- Form Component Styling (Contact Page) --- */

/* Form Card Container (max-w-xl mx-auto bg-white shadow-xl rounded-xl p-8 sm:p-10 lg:p-12) */
.form-card {
    max-width: 42rem; /* max-w-xl */
    margin-left: auto;
    margin-right: auto;
    background-color: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
    border-radius: 0.75rem; /* rounded-xl */
    padding: 2rem; /* p-8 */
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) { /* sm breakpoint */
    .form-card {
        padding: 2.5rem; /* sm:p-10 */
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .form-card {
        padding: 3rem; /* lg:p-12 */
    }
}

/* Form Headings */
.form-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    color: var(--dark-text); 
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-description {
    color: var(--light-gray);
    margin-bottom: 2rem;
    text-align: center;
}

/* Form Body */
.form-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* space-y-6 */
}

/* Form Group (Label and Field wrapper) */
.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.required-star {
    color: #ef4444; /* red-500 */
}

/* Error Message */
.form-error-message {
    margin-top: 0.5rem;
    font-size: 0.875rem; /* text-sm */
    color: #dc2626; /* red-600 */
}

/* Submit Button (Fix is included below) */
.form-submit-button {
    /* --- FIX FOR OLDER APPEARANCE --- */
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;         
    border: none;
    /* --------------------------------- */

    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-lg */
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #fff;
    background-color: var(--primary-color);
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.form-submit-button:hover {
    background-color: var(--primary-light);
}

.form-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(67, 38, 137, 0.4); /* Focus ring using primary color */
}

/* --- Home Page Hero Section (Supporting home.html) --- */
.hero-section {
    text-align: center;
    padding: 4rem 1rem; /* py-16 */
    background-color: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
    border-radius: 0.75rem; /* rounded-xl */
}

.hero-title {
    font-size: 3rem; /* text-5xl (will scale up on larger screens) */
    line-height: 1;
    font-weight: 800; /* font-extrabold */
    color: var(--dark-text); 
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .hero-title {
        font-size: 4rem; /* Making it truly 5xl equivalent */
    }
}

.hero-subtitle {
    font-size: 1.25rem; /* text-xl */
    color: var(--light-gray);
    margin-bottom: 2rem;
    max-width: 42rem; /* max-w-2xl */
    margin-left: auto;
    margin-right: auto;
}

/* --- Legal Document Styling (Supporting legal.html) --- */
.legal-document {
    max-width: 64rem; /* max-w-4xl */
    margin-left: auto;
    margin-right: auto;
    background-color: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
    border-radius: 0.75rem; /* rounded-xl */
    padding: 2rem; /* p-8 */
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) { /* sm breakpoint */
    .legal-document {
        padding: 2.5rem; /* sm:p-10 */
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .legal-document {
        padding: 3rem; /* lg:p-12 */
    }
}

.legal-title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: var(--dark-text); 
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #d1d5db; 
    padding-bottom: 0.75rem; /* pb-3 */
}

.legal-content {
    color: var(--text-color); /* text-gray-700 */
    line-height: 1.75; /* leading-relaxed */
}

/* Convert Tailwind's space-y-4 class to standard margin-bottom on child elements */
.legal-content > p {
    margin-bottom: 1rem; /* space-y-4 equivalent */
}
