/*
Theme Name: 12 Elements Corporate Intranet
Theme URI: https://12elements.com
Author: 12 Elements
Author URI: https://12elements.com
Description: A modern corporate intranet theme with department management, HR tools, and operational dashboards. Converted from React application.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twelve-elements
Tags: corporate, intranet, business, dashboard, custom-colors

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* CSS Variables - Emerald & Champagne Theme */
:root {
  /* Colors - New Theme Colors */
  --color-primary: #073B3A;
  /* Deep Emerald - Headers, Buttons, Dark Backgrounds */
  --color-primary-light: #0a4f4d;
  /* Lighter Emerald */
  --color-accent: #D1B164;
  /* Still Champagne - Badges, Highlights, Borders */
  --color-teal: #2B8079;
  /* Teal - Borders, Inputs, Charts */
  --color-background: #F7F4ED;
  /* Bone - Main Page Background */
  --color-card: #ffffff;
  /* White - Card backgrounds */
  --color-text: #1e293b;
  /* Dark Gray - Text */
  --color-text-light: #64748b;
  /* Light Gray - Secondary Text */
  --color-border: #2B8079;
  /* Teal - Borders */
  --color-secondary-bg: #C0C8CC;
  /* Granite - Secondary backgrounds, muted elements */
  --color-muted: #C0C8CC;
  /* Granite - Muted elements */

  /* Fonts - Avenir Throughout */
  --font-sans: 'Avenir', 'Avenir Next', 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Avenir', 'Avenir Next', 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

#main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Grid System - React/Tailwind Style */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.grid-cols-7 {
  grid-template-columns: repeat(7, 1fr);
}

.grid-cols-8 {
  grid-template-columns: repeat(8, 1fr);
}

.grid-cols-9 {
  grid-template-columns: repeat(9, 1fr);
}

.grid-cols-10 {
  grid-template-columns: repeat(10, 1fr);
}

.grid-cols-11 {
  grid-template-columns: repeat(11, 1fr);
}

.grid-cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

/* Responsive Grid - Exact React/Tailwind breakpoints */
@media (min-width: 640px) {
  .sm\:grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .sm\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .sm\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .md\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .lg\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .xl\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .xl\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .xl\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .xl\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1536px) {
  .\32xl\:grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .\32xl\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .\32xl\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .\32xl\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .\32xl\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .\32xl\:grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Visibility Utilities */
.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

.flex {
  display: flex !important;
}

@media (max-width: 768px) {
  .md-hidden {
    display: none !important;
  }

  .md-block {
    display: block !important;
  }

  .md-flex {
    display: flex !important;
  }
}

@media (min-width: 769px) {
  .lg-hidden {
    display: none !important;
  }

  .lg-block {
    display: block !important;
  }

  .lg-flex {
    display: flex !important;
  }
}

/* Padding/Margin Utilities for Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .mt-4 {
    margin-top: 1.5rem;
  }

  .mb-4 {
    margin-bottom: 1.5rem;
  }
}

/* Card Component */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: #f8fafc;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-light);
  color: white;
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: #c4152f;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--color-accent);
  color: white;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-accent {
  color: var(--color-accent);
}

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

.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;
}

.py-2 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-3 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* =================================================================
   MOBILE RESPONSIVE STYLES
   ================================================================= */

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  body {
    font-size: 14px;
  }
}

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

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  h4 {
    font-size: 1rem;
  }
}

/* Responsive Container */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* Responsive Flex Layouts - Stack on Mobile */
@media (max-width: 768px) {
  .flex-row-mobile-col {
    flex-direction: column !important;
  }

  .flex-center-mobile {
    align-items: center !important;
    text-align: center !important;
  }

  .gap-mobile-sm {
    gap: 0.75rem !important;
  }
}

/* Hero/Banner Responsive */
@media (max-width: 1024px) {
  [style*="min-height: 420px"] {
    min-height: 320px !important;
  }
}

@media (max-width: 768px) {

  [style*="min-height: 420px"],
  [style*="min-height: 320px"] {
    min-height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  [style*="font-size: 3rem"] {
    font-size: 1.75rem !important;
  }

  [style*="font-size: 2.25rem"] {
    font-size: 1.5rem !important;
  }

  [style*="font-size: 1.5rem"] {
    font-size: 1.125rem !important;
  }
}

/* Button Responsive */
@media (max-width: 768px) {
  .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
  }

  [style*="padding: 0 1.5rem"] .btn,
  .btn[style*="padding: 0 1.5rem"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Card Responsive */
@media (max-width: 768px) {
  .card-content {
    padding: 1rem;
  }

  .card-header {
    padding: 1rem;
  }
}

/* Hide/Show Elements on Mobile */
@media (max-width: 1024px) {
  .hide-on-tablet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: block !important;
  }

  .mobile-full-width {
    width: 100% !important;
  }

  .mobile-text-center {
    text-align: center !important;
  }
}

/* Mobile Navigation Styles */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }
}

/* KPI Ticker Mobile */
@media (max-width: 768px) {
  .kpi-ticker {
    font-size: 0.75rem !important;
  }

  .kpi-ticker [style*="gap: 4rem"] {
    gap: 2rem !important;
  }

  .kpi-ticker [style*="font-size: 0.875rem"] {
    font-size: 0.75rem !important;
  }
}

/* Carousel/Slider Mobile */
@media (max-width: 768px) {
  .apps-carousel {
    padding: 0 2rem !important;
  }

  .carousel-item {
    width: 120px !important;
  }

  .carousel-prev,
  .carousel-next {
    width: 2rem !important;
    height: 2rem !important;
  }
}

/* Tab Navigation Mobile */
@media (max-width: 768px) {

  [style*="display: inline-flex"].tab-container,
  .tab-btn {
    font-size: 0.75rem !important;
    padding: 0.5rem 1rem !important;
  }
}

/* Table Responsive */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .responsive-table {
    font-size: 0.875rem;
  }
}

/* Modal/Dropdown Mobile */
@media (max-width: 768px) {

  .notifications-dropdown,
  .user-dropdown,
  [style*="width: 26rem"] {
    width: calc(100vw - 2rem) !important;
    max-width: none !important;
    left: 1rem !important;
    right: 1rem !important;
  }
}

/* Spacing Adjustments for Mobile */
@media (max-width: 768px) {
  [style*="padding: 3rem"] {
    padding: 2rem !important;
  }

  [style*="padding: 2rem"] {
    padding: 1.5rem !important;
  }

  [style*="gap: 3rem"] {
    gap: 1.5rem !important;
  }

  [style*="gap: 2rem"] {
    gap: 1rem !important;
  }

  [style*="margin: 0 -1.5rem"] {
    margin: 0 -1rem !important;
  }
}

/* Search Bar Mobile */
@media (max-width: 768px) {

  input[type="text"],
  input[type="search"],
  input[type="email"] {
    font-size: 16px !important;
    /* Prevents zoom on iOS */
  }
}

/* Image/Avatar Responsive */
/* @media (max-width: 768px) {

  [style*="width: 10rem"],
  [style*="height: 10rem"] {
    width: 8rem !important;
    height: 8rem !important;
  }
} */

/* Overflow Handling */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    overflow-x: hidden;
  }
}

/* Touch-Friendly Click Targets */
@media (max-width: 768px) {

  button,
  .btn,
  a[style*="cursor: pointer"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Flex Wrap Mobile */
@media (max-width: 768px) {
  [style*="display: flex"]:not([style*="flex-wrap"]):not(.site-header *):not(.header-actions):not(#mobile-menu-drawer *) {
    flex-wrap: wrap;
  }
}

/* =================================================================
   UNIFIED PAGE HEADER BANNER - Mobile
   Ensures identical header styling across News, Calendar, Organization,
   HR Apps, IT Central, Operations, and Marketing pages.
   Reference: News & Announcements page (template-announcements.php)
   ================================================================= */
@media (max-width: 768px) {
  /* Header banner padding - matches News page */
  .page-header-banner {
    padding: 1.5rem 1rem !important;
  }

  /* H1 heading - 1.5rem, 700 weight, tight line-height */
  .page-header-banner h1 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.025em !important;
    margin: 0 !important;
    color: white !important;
  }

  /* Subtitle paragraph - 0.875rem, slightly translucent white */
  .page-header-banner .page-header-text p {
    font-size: 0.875rem !important;
    margin: 0.375rem 0 0 0 !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  /* Stack title/search vertically, left-aligned */
  .page-header-banner .container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Search bar full width on mobile */
  .page-header-banner .page-header-search,
  .page-header-banner .search-wrapper,
  .page-header-banner .hr-search-wrapper {
    max-width: 100% !important;
    width: 100% !important;
  }
}