/* ========================================
   NordSAR – Global Styles
   Nord Search and Rescue n.e.V.
======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --primary:        #0a3d6b;
    --primary-light:  #1a5fa8;
    --primary-dark:   #062a4e;
    --accent:         #e8b84b;
    --accent-dark:    #c9962a;
    --danger:         #c0392b;
    --success:        #27ae60;
    --warning:        #f39c12;
    --text:           #1a1a2e;
    --text-muted:     #5a6377;
    --text-light:     #8896a5;
    --bg:             #f5f7fa;
    --bg-white:       #ffffff;
    --bg-section:     #eef1f6;
    --border:         #d0d9e8;
    --border-light:   #e8edf5;
    --shadow-sm:      0 2px 8px rgba(10,61,107,0.08);
    --shadow-md:      0 6px 24px rgba(10,61,107,0.12);
    --shadow-lg:      0 16px 48px rgba(10,61,107,0.18);
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --radius-xl:      32px;
    --font:           'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition:     0.28s cubic-bezier(0.4,0,0.2,1);
    --container:      1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}
.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-secondary {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}
.btn-secondary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border-color: var(--primary-light);
}
.btn-outline:hover {
    background: var(--primary-light);
    color: #fff;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { background: #a93226; border-color: #a93226; color:#fff; }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ---------- Section Titles ---------- */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
}
.section-label {
    display: inline-block;
    background: rgba(10,61,107,0.08);
    color: var(--primary-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}
.title-accent {
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

/* ---------- Badge ---------- */
.badge {
    display: inline-block;
    padding: 0.25em 0.7em;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-success { background: rgba(39,174,96,0.12); color: var(--success); }
.badge-warning { background: rgba(243,156,18,0.12); color: var(--warning); }
.badge-danger  { background: rgba(192,57,43,0.12);  color: var(--danger); }
.badge-primary { background: rgba(26,95,168,0.12);  color: var(--primary-light); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.4rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26,95,168,0.15);
}
textarea.form-control { resize: vertical; min-height: 140px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}
.alert-success { background: rgba(39,174,96,0.1); color: #1e8449; border-color: rgba(39,174,96,0.3); }
.alert-danger  { background: rgba(192,57,43,0.1);  color: #a93226; border-color: rgba(192,57,43,0.3); }
.alert-warning { background: rgba(243,156,18,0.1); color: #9a7d0a; border-color: rgba(243,156,18,0.3); }
.alert-info    { background: rgba(26,95,168,0.08); color: var(--primary); border-color: rgba(26,95,168,0.2); }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.page-hero p {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 600px;
    margin: 0 auto;
}
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.75;
}
.breadcrumb a { color: #fff; }
.breadcrumb span { opacity: 0.6; }

/* ---------- Section Padding ---------- */
.section-pad { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }
.bg-white  { background: var(--bg-white); }
.bg-light  { background: var(--bg-section); }
.bg-primary { background: var(--primary); color: #fff; }

/* ---------- Grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ---------- Notfall-Button in Header ---------- */
.btn-notfall-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    animation: pulse-red 2.5s infinite;
    transition: transform var(--transition);
    white-space: nowrap;
}
.btn-notfall-header:hover { transform: scale(1.05); }
@keyframes pulse-red {
    0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}

/* ---------- Notfall Modal ---------- */
.notfall-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,20,40,0.75);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.notfall-modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s ease;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.notfall-modal-header {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
}
.notfall-modal-icon {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.notfall-modal-header h2 { font-size: 1.4rem; flex: 1; }
.notfall-close {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.2);
    color: #fff; border: none; border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem;
    transition: background var(--transition);
}
.notfall-close:hover { background: rgba(255,255,255,0.35); }
.notfall-modal-body { padding: 1.5rem 2rem; }
.notfall-hint {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.notfall-numbers { display: flex; flex-direction: column; gap: 0.75rem; }
.notfall-number {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 2px solid transparent;
}
.notfall-number:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}
.notfall-primary { background: rgba(192,57,43,0.08); border-color: rgba(192,57,43,0.2); }
.notfall-police  { background: rgba(10,61,107,0.08); border-color: rgba(10,61,107,0.2); }
.notfall-rettung { background: rgba(243,156,18,0.08); border-color: rgba(243,156,18,0.2); }
.notfall-seelsorge { background: rgba(39,174,96,0.08); border-color: rgba(39,174,96,0.2); }
.notfall-nordsar { background: rgba(26,95,168,0.08); border-color: rgba(26,95,168,0.3); }
.notfall-num-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.notfall-primary  .notfall-num-icon { background: rgba(192,57,43,0.15); color: var(--danger); }
.notfall-police   .notfall-num-icon { background: rgba(10,61,107,0.15);  color: var(--primary); }
.notfall-rettung  .notfall-num-icon { background: rgba(243,156,18,0.15); color: var(--warning); }
.notfall-seelsorge .notfall-num-icon { background: rgba(39,174,96,0.15); color: var(--success); }
.notfall-nordsar  .notfall-num-icon { background: rgba(26,95,168,0.15);  color: var(--primary-light); }
.notfall-num-info {
    display: flex; flex-direction: column; gap: 0.15rem; flex: 1;
}
.notfall-num-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.notfall-num-number { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.notfall-num-desc { font-size: 0.75rem; color: var(--text-muted); }
.notfall-call-icon { color: var(--text-muted); margin-left: auto; font-size: 0.9rem; }
.notfall-info-box {
    display: flex; align-items: flex-start; gap: 0.75rem;
    background: rgba(26,95,168,0.06);
    border-left: 3px solid var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.notfall-info-box i { color: var(--primary-light); margin-top: 0.1rem; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
    .section-pad { padding: 2.5rem 0; }
    .section-pad-sm { padding: 1.75rem 0; }
    .page-hero { padding: 3rem 0 2rem; }
    .page-hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
    .page-hero p { font-size: 0.95rem; }

    /* Buttons: größere Touch-Targets */
    .btn { padding: 0.85rem 1.4rem; font-size: 0.9rem; min-height: 48px; }
    .btn-sm { padding: 0.6rem 1rem; font-size: 0.82rem; min-height: 40px; }
    .btn-lg { padding: 1rem 1.75rem; font-size: 1rem; min-height: 52px; }

    /* Section Title */
    .section-title { margin-bottom: 2rem; }
    .section-title h2 { font-size: clamp(1.5rem, 5vw, 2rem); }

    /* Notfall Modal */
    .notfall-modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .notfall-overlay { align-items: flex-end; padding: 0; }
    .notfall-modal-body { padding: 1.25rem; }
    .notfall-modal-header { padding: 1.25rem; }
    .notfall-num-number { font-size: 1.1rem; }

    /* Notfall-Button im Header */
    .btn-notfall-header { padding: 0.5rem 0.75rem; font-size: 0.78rem; }
    .btn-notfall-header span { display: none; }

    /* Karten */
    .card { border-radius: var(--radius-md); }

    /* Alerts */
    .alert { font-size: 0.88rem; padding: 0.875rem 1rem; }

    /* Formular */
    .form-control { font-size: 16px; /* verhindert iOS-Zoom */ padding: 0.85rem 1rem; }
}

@media (max-width: 400px) {
    .container { padding: 0 0.875rem; }
    .btn { padding: 0.8rem 1.1rem; }
    .section-pad { padding: 2rem 0; }
}

