/* Cypress Point Strata - Responsive Design System */

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ============================================================
   COLOR PALETTE
   ============================================================ */

:root {
    --color-primary: #d699ad;
    --color-dark: #903333;
    --color-light-bg: #f8f9fa;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-hover: #c17a93;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

small {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ============================================================
   HEADER STYLING
   ============================================================ */

header {
    background: linear-gradient(135deg, #5c1a2d 0%, #3d0f1a 100%);
    color: var(--color-white);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    width: 100%;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--color-white);
}

header p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1;
}

/* ============================================================
   NAVIGATION STYLING
   ============================================================ */

nav {
    background-color: #3d0f1a;
    padding: 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    color: var(--color-white);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #6b2738;
    color: var(--color-white);
}

.nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
    padding: 1.25rem;
    background: none;
    border: none;
    color: var(--color-white);
}

.hamburger span {
    width: 28px;
    height: 4px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Dropdown Menu */
.dropdown-toggle {
    position: relative;
    padding-right: 1.75rem;
}

.dropdown-toggle::after {
    content: '';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.3s ease;
}

.dropdown-toggle.active::after {
    transform: translateY(-35%) rotate(225deg);
}

.dropdown-menu {
    list-style: none;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #3d0f1a;
    min-width: 200px;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--color-primary);
}

/* ============================================================
   MAIN CONTAINER & LAYOUT
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

main {
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.page-title {
    color: var(--color-dark);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 1rem;
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.content-section {
    margin: 2rem 0;
}

.section-title {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-title:first-child {
    margin-top: 0;
}

/* Year/Category Sections */
.year-section,
.category-section {
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
}

.year-section h3,
.category-section h3 {
    color: var(--color-dark);
    margin-bottom: 1rem;
}

/* Collapsible Sections */
.collapsible {
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.collapsible-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--color-dark);
    transition: background-color 0.3s ease;
    user-select: none;
}

.collapsible-header:hover {
    background-color: #f0f0f0;
}

.collapsible-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.collapsible.active .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    display: none;
    padding: 0 1rem 1rem 1rem;
}

.collapsible.active .collapsible-content {
    display: block;
}

/* ============================================================
   LINKS & BUTTONS
   ============================================================ */

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

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--color-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--color-dark);
}

.btn-secondary:hover {
    background-color: #6b2424;
}

/* Document Link List */
.document-list {
    list-style: none;
    padding: 0;
}

.document-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.document-item:last-child {
    border-bottom: none;
}

.document-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.document-link::after {
    content: '→';
    margin-left: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-link:hover::after {
    opacity: 1;
}

/* ============================================================
   FORMS
   ============================================================ */

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    width: 100%;
}

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

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
}

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

footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-light);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: var(--color-light-bg);
    border-radius: 4px;
}

.breadcrumb-item {
    color: var(--color-text-light);
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--color-border);
}

.breadcrumb-item:last-child::after {
    content: '';
}

.breadcrumb-item.active {
    color: var(--color-text);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--color-primary);
}

/* ============================================================
   RESPONSIVE DESIGN - TABLET & ABOVE
   ============================================================ */

@media (min-width: 768px) {
    body {
        padding-top: 13rem;
    }

    header h1 {
        font-size: 2rem;
    }

    nav {
        position: fixed;
        top: 5rem;
        left: 0;
        right: 0;
        z-index: 99;
        width: 100%;
    }

    .container {
        padding: 2rem;
    }

    main {
        padding: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .nav-menu {
        flex-wrap: nowrap;
    }

    .hamburger {
        display: none;
    }

    .dropdown-menu {
        position: absolute;
        display: none !important;
        top: 100%;
        left: 0;
        background-color: #3d0f1a;
        min-width: 200px;
        box-shadow: var(--shadow-sm);
        padding: 0.5rem 0;
        margin: 0;
        z-index: 100;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block !important;
    }

    .nav-item {
        position: relative;
    }
}

/* ============================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================================ */

@media (max-width: 767px) {
    body {
        padding-top: 5rem;
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
        order: -1;
    }

    nav {
        background-color: #3d0f1a;
    }

    .nav-container {
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        display: flex;
        max-height: 500px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.9rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.1);
        padding: 0.25rem 0;
    }

    .dropdown-menu.active {
        display: flex;
        flex-direction: column;
    }

    .dropdown-item {
        padding: 0.5rem 1.5rem;
        border-left: 3px solid var(--color-primary);
        font-size: 0.85rem;
    }

    .container {
        padding: 1rem;
    }

    main {
        padding: 1rem;
        border-radius: 4px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .document-list {
        padding: 0;
    }

    .year-section,
    .category-section {
        margin-bottom: 1.5rem;
        padding-left: 0.75rem;
    }

    .collapsible-header {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .collapsible-content {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    header, nav, footer {
        display: none;
    }

    body {
        background: white;
        font-size: 12pt;
    }

    main {
        box-shadow: none;
        padding: 0;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }
}

/* ============================================================
   ACCESSIBILITY & HIGH CONTRAST
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    main, .collapsible {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }

    .collapsible-header:hover {
        background-color: #3a3a3a;
    }

    input, select, textarea {
        background-color: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
}
