/*
Theme Name: JobTermin
Theme URI: https://jobtermin.com
Author: JobTermin Team
Author URI: https://jobtermin.com
Description: A modern job portal theme for WordPress with multilingual support (DE, EN, AR)
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jobtermin
Tags: job-portal, modern, dark-theme, multilingual, responsive
*/

/* ===================================
   Global Styles
   =================================== */

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

:root {
    --color-primary: #3b82f6;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #60a5fa;
    --color-bg-dark: #0f172a;
    --color-bg-darker: #0f172a;
    --color-bg-light: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --transition-speed: 0.3s;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f172a !important;
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    background: linear-gradient(to bottom, #0f172a, #1e293b, #0f172a) !important;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-secondary);
}

/* ===================================
   Utility Classes
   =================================== */

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

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

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

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

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   WordPress Core Styles
   =================================== */

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.sticky {
    /* Sticky post styles */
}

.bypostauthor {
    /* Post author styles */
}

/* ===================================
   Gutenberg Block Support - FIXED
   =================================== */

.wp-block-image {
    margin-bottom: 1.5rem;
}

/* FIXED: Only apply to content images, NOT header/footer logos */
.wp-block-image img,
main img:not(.logo-icon img):not(footer img) {
    max-width: 100%;
    height: auto;
}

.wp-block-quote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* ===================================
   CRITICAL: Logo SVG Protection
   =================================== */

/* Prevent global styles from affecting header/footer logos */
header .logo-icon svg,
footer svg {
    max-width: none !important;
    height: auto !important;
}

/* Ensure logo containers don't collapse */
header .logo-icon,
footer .logo-icon,
header div.logo-icon,
footer div > div > div > div:first-child {
    min-width: fit-content !important;
}

/* ===================================
   Accessibility
   =================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    body {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}
