/**
 * SwissVibe — Shared CSS
 * Common styles used across all pages.
 * Page-specific styles remain inline in each PHP file.
 */

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

/* ── Skip Link (accessibility) ─────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #dc143c;
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.2s;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    top: 0;
}

/* ── Header ────────────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 {
    text-align: center;
    color: #dc143c;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tagline {
    text-align: center;
    color: #555;
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.user-info a {
    color: #dc143c;
    text-decoration: none;
    font-weight: 500;
}

.user-info a:hover {
    text-decoration: underline;
}

/* ── Buttons ───────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #dc143c, #a00000);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.btn-secondary {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #555;
}

/* ── Messages / Alerts ─────────────────────────── */
.message,
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.message.success,
.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.message.error,
.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* ── Forms (shared) ────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
}

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

/* ── Cards ─────────────────────────────────────── */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ── Loading spinner ───────────────────────────── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner--dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: #dc143c;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ── Social Links ──────────────────────────────── */
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85em;
    transition: background 0.2s, transform 0.2s;
}

.social-link:hover {
    transform: scale(1.05);
}

.social-link--twitter:hover  { background: #1da1f2; }
.social-link--linkedin:hover { background: #0077b5; }
.social-link--instagram:hover { background: #e4405f; }
.social-link--whatsapp:hover { background: #25d366; }
.social-link--facebook:hover { background: #1877f2; }

/* Social icons (round style, used in includes/footer.php) */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.social-icon:hover {
    transform: scale(1.15);
}

.social-icon--twitter  { background: #1a1a2e; }
.social-icon--twitter:hover  { background: #000; }
.social-icon--linkedin { background: #0077b5; }
.social-icon--linkedin:hover { background: #005a8c; }
.social-icon--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icon--facebook { background: #1877f2; }
.social-icon--facebook:hover { background: #1466d2; }

/* Footer CTA buttons */
.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    transition: transform 0.2s, box-shadow 0.2s;
}

.footer-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-cta--review {
    background: linear-gradient(135deg, #dc143c, #a00000);
}

.footer-cta--support {
    background: linear-gradient(135deg, #FF424D, #ff6b6b);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .user-info {
        justify-content: center;
    }
}

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