/*
Theme Name: Newar Records APS
Theme URI: https://newar.it
Author: Newar Records Team
Author URI: https://newar.it
Description: Template WordPress moderno, dinamico ed elegante per Newar Records APS - Service Audio e Luci, Produzione Musicale, Gestione Eventi
Version: 1.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: newar-records
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, portfolio, events
*/

/* ============================
 CSS VARIABLES & RESET
 ============================ */

:root {
  --color-white: #FFFFFF;
  --color-black: #0a0a0a;
  --color-gold: #D4AF37;
  --color-dark-gray: #1a1a1a;
  --color-light-gray: #1e1e1e;
  --color-medium-gray: #888888;

  --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', sans-serif;

  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);

  --container-width: 1200px;
  --section-padding: 100px;
  --section-padding-mobile: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.7;
  color: #e0e0e0;
  background-color: #000000;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  /* For particles */
}

body.menu-open {
  overflow: hidden;
}

/* Particles Canvas */
#antigravity-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* Above video, below content */
  pointer-events: none;
}

/* ============================
 TYPOGRAPHY
 ============================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1.5rem;
  color: #b0b0b0;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: #ffffff;
}

/* ============================
 UTILITIES
 ============================ */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  position: relative;
  /* Ensure content is above particles */
  z-index: 2;
}

.section {
  padding: var(--section-padding) 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 20px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-black));
}

.section-subtitle {
  color: var(--color-medium-gray);
  font-size: 1.125rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-white);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: #1a1a1a;
  color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn-secondary:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #0a0a0a;
  transform: translateY(-2px);
}

.btn-white {
  background: var(--color-white);
  color: #0a0a0a;
}

.btn-white:hover {
  background: var(--color-gold);
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
 HEADER & NAVIGATION
 ============================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-base);
  background: transparent;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.05em;
  transition: var(--transition-base);
  white-space: nowrap;
}

.site-logo span {
  color: var(--color-gold);
  margin-left: 8px;
}

.site-logo:hover {
  color: var(--color-gold);
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 50px;
  flex: 1;
  justify-content: flex-end;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: relative;
  padding: 5px 0;
  display: block;
  transition: var(--transition-base);
  white-space: nowrap;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
  width: 100%;
}

.main-navigation a:hover {
  color: var(--color-gold);
}

/* Dropdown Menu (Submenu) */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(10px);
  min-width: 250px;
  padding: 15px 0;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.2);
  z-index: 1000;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
}

.main-navigation li:hover>ul {
  display: flex;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-navigation ul ul li {
  width: 100%;
}

.main-navigation ul ul a {
  padding: 12px 25px;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.02em;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.main-navigation ul ul a::after {
  display: none;
}

.main-navigation ul ul a:hover {
  background: rgba(212, 175, 55, 0.1);
  border-left-color: var(--color-gold);
  padding-left: 30px;
  color: var(--color-gold);
}

/* Dropdown Arrow Indicator */
.main-navigation .menu-item-has-children>a::before {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 6px;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.main-navigation .menu-item-has-children:hover>a::before {
  transform: rotate(180deg);
}

/* ============================
 HERO SECTION
 ============================ */

.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  margin-bottom: 1.5rem;
  color: var(--color-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.hero-title span {
  color: var(--color-gold);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-indicator span {
  display: block;
  width: 30px;
  height: 50px;
  border: 2px solid var(--color-white);
  border-radius: 25px;
  position: relative;
}

.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    top: 8px;
    opacity: 1;
  }

  100% {
    top: 32px;
    opacity: 0;
  }
}

/* ============================
 HERO SECTION
 ============================ */

.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  margin-bottom: 1.5rem;
  color: var(--color-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.hero-title span {
  color: var(--color-gold);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-indicator span {
  display: block;
  width: 30px;
  height: 50px;
  border: 2px solid var(--color-white);
  border-radius: 25px;
  position: relative;
}

.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    top: 8px;
    opacity: 1;
  }

  100% {
    top: 32px;
    opacity: 0;
  }
}

/* ============================
 RESPONSIVE
 ============================ */

/* DESKTOP - Hide mobile menu, show main navigation */
@media (min-width: 601px) {
  .menu-toggle {
    display: none !important;
  }
  
  .main-navigation {
    display: flex !important;
  }
}

@media (max-width: 600px) {
  :root {
    --section-padding: 60px;
    --section-padding-mobile: 40px;
  }

  html {
    font-size: 16px;
    /* Restore base size for readability */
  }

  /* Typography Improvements */
  h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1.2rem;
  }

  h2 {
    font-size: 1.9rem;
    line-height: 1.35;
    margin-bottom: 1rem;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  h4 {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.2rem;
  }

  /* Mobile Menu Toggle */
  .menu-toggle {
    display: flex !important;
    z-index: 1001;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
  }

  .menu-toggle span {
    width: 26px;
    height: 3px;
  }

  .main-navigation {
    display: none;
  }

  .main-navigation.mobile-active {
    display: flex !important;
  }

  /* Navigation */
  .main-navigation {
    width: 100%;
    max-width: none;
    padding-top: 80px;
    background: rgba(0, 0, 0, 0.98);
  }

  .main-navigation a {
    font-size: 1.1rem;
    padding: 16px 0;
    text-align: center;
    line-height: 1.4;
  }

  /* Hero Section Optimization */
  .hero-section {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  .hero-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.15) !important;
    z-index: 0 !important;
    filter: grayscale(100%) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Assicura che il video container sia sempre visibile */
  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-color: #000;
  }

  /* Extra small devices - landscape mode */
  @media (max-height: 500px) {
    .hero-video {
      transform: translate(-50%, -50%) scale(1.3) !important;
    }
  }

  /* Phones in portrait mode - extra optimization */
  @media (max-width: 480px) {
    .hero-video {
      transform: translate(-50%, -50%) scale(1.2) !important;
    }
  }
  
  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
    pointer-events: none;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 90%;
    padding: 0 20px;
  }

  .hero-content {
    padding: 0 20px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 2;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0;
    line-height: 1.5;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  .hero-buttons .btn {
    width: 100%;
  }
  
  /* Scroll indicator */
  .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
  }

  /* Touch-Friendly Buttons */
  .btn {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.2;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Navigation */
  .menu-toggle {
    display: flex;
    padding: 10px;
    /* Larger touch area */
  }

  .main-navigation {
    width: 100%;
    /* Full width menu */
    max-width: none;
    padding-top: 80px;
    background: rgba(0, 0, 0, 0.95);
    /* Solid background */
  }

  .main-navigation a {
    font-size: 1.2rem;
    /* Larger menu text */
    padding: 15px 0;
    text-align: center;
  }

  /* Layout & Spacing */
  .container {
    padding: 0 16px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .section {
    padding: 30px 0;
  }

  .section-title {
    margin-bottom: 15px;
    padding: 0 8px;
  }

  .section-title h2 {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
  }

  /* Grid Optimized for Mobile - 2 columns with minimal spacing */
  .values-grid,
  .services-grid,
  .bacheca-grid,
  .portfolio-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  /* Single column for text-heavy layouts */
  .about-content,
  .contact-wrapper,
  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Card Improvements - Compact for more items */
  .value-card,
  .service-card,
  .team-member,
  .bacheca-item,
  .portfolio-item {
    padding: 4px 3px;
    margin-bottom: 0;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
  }

  .value-card i,
  .service-card i {
    font-size: 0.95rem;
    margin-bottom: 2px;
    display: block;
  }

  .value-card h4,
  .service-card h3 {
    font-size: 0.7rem;
    margin-bottom: 2px;
    line-height: 1.2;
    font-weight: 600;
  }

  .value-card p,
  .service-card p {
    font-size: 0.58rem;
    line-height: 1.2;
    margin: 0;
  }

  /* Form Optimization */
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 15px;
    /* Larger input areas */
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  /* Portfolio Page Mobile */
  .portfolio-controls {
    flex-direction: column;
    gap: 20px;
  }

  .portfolio-filters {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 4px;
  }

  .filter-btn {
    flex: 0 0 calc(50% - 3px);
    max-width: calc(50% - 3px);
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.65rem;
  }
  
  .filter-btn:first-child {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 3px;
  }

  .portfolio-search {
    width: 100%;
  }

  /* Mobile Header Optimization */
  .header-container {
    padding: 10px 18px;
    gap: 12px;
  }

  .site-logo {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .site-header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
  }

  .main-navigation.mobile-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.98);
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 30px 30px;
    overflow-y: auto;
    z-index: 999;
  }

  .main-navigation.mobile-active ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .main-navigation.mobile-active li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .main-navigation.mobile-active a {
    font-size: 1.1rem;
    padding: 18px 0;
    display: block;
    text-align: left;
  }

  .main-navigation .btn {
    margin-top: 20px;
    width: 100%;
  }

  /* Mobile-specific utilities */
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: block !important;
  }

  /* Improved touch targets */
  a, button, .btn, .filter-btn, input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Prevent text zoom on orientation change */
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* Better table responsiveness */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Image responsiveness - No cropping */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .about-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
  }

  .portfolio-thumbnail img,
  .service-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* Video responsiveness */
  .hero-video,
  video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* Ensure all containers don't overflow */
  .container,
  .section,
  .hero-content,
  .about-content,
  .portfolio-grid,
  .services-grid {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================
 SMALLER MOBILE (480px and below)
 ============================ */
@media (max-width: 480px) {
  :root {
    --section-padding: 40px;
  }

  h1 { font-size: 1.9rem; line-height: 1.3; }
  h2 { font-size: 1.65rem; line-height: 1.35; }
  h3 { font-size: 1.35rem; line-height: 1.4; }
  
  .container { padding: 0 16px; max-width: 100%; }
  .section { padding: 40px 0; }

  .btn {
    padding: 13px 18px;
    font-size: 0.9rem;
    min-height: 46px;
  }

  /* Hero adjustments */
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 0.95rem; }

  /* Keep 2 columns with tighter spacing */
  .values-grid,
  .services-grid,
  .bacheca-grid,
  .portfolio-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .value-card,
  .service-card,
  .team-member,
  .bacheca-item,
  .portfolio-item {
    padding: 4px 3px;
  }

  .value-card i,
  .service-card i {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }

  .value-card h4,
  .service-card h3 {
    font-size: 0.65rem;
    margin-bottom: 1px;
    line-height: 1.2;
  }

  .value-card p,
  .service-card p {
    font-size: 0.55rem;
    line-height: 1.2;
    margin: 0;
  }

  /* Better stats layout */
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-item {
    padding: 12px 8px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }
}

/* ============================
 VERY SMALL MOBILE (360px and below)
 ============================ */
@media (max-width: 360px) {
  :root {
    --section-padding: 35px;
  }

  html { font-size: 15px; }

  h1 { font-size: 1.75rem; line-height: 1.3; }
  h2 { font-size: 1.5rem; line-height: 1.35; }
  h3 { font-size: 1.25rem; line-height: 1.4; }
  
  .container { padding: 0 14px; max-width: 100%; }
  .section { padding: 35px 0; }
  
  .section-title h2 { font-size: 1.5rem; }
  .section-subtitle { font-size: 0.9rem; }

  .btn {
    padding: 8px 12px;
    font-size: 0.75rem;
    min-height: 38px;
  }

  /* Hero compact */
  .hero-section { min-height: 450px; height: 100vh; }
  .hero-title { font-size: 1.75rem; line-height: 1.25; }
  .hero-subtitle { font-size: 0.9rem; padding: 0; }

  /* Cards - Minimal size for maximum density */
  .values-grid,
  .services-grid,
  .bacheca-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .value-card,
  .service-card,
  .portfolio-item,
  .bacheca-item,
  .team-member {
    padding: 4px 3px;
  }

  .value-card i,
  .service-card i {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  .value-card h4,
  .service-card h3 {
    font-size: 0.65rem;
    margin-bottom: 2px;
    line-height: 1.15;
  }

  .value-card p,
  .service-card p {
    font-size: 0.55rem;
    line-height: 1.2;
    margin: 0;
  }

  /* Compact stats */
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .stat-item {
    padding: 10px 6px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  /* Form Elements */
  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px;
    font-size: 15px;
  }

  /* Navigation Logo */
  .site-logo {
    font-size: 1.15rem;
  }

  .header-container {
    padding: 8px 14px;
  }

  /* Footer Optimization */
  .footer-widgets {
    gap: 24px;
  }

  .footer-widget h3 {
    font-size: 1.1rem;
  }
}

  /* Form Elements */
  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 13px;
    font-size: 15px;
  }

  /* Navigation Logo */
  .site-logo {
    font-size: 1.15rem;
  }

  .header-container {
    padding: 10px 18px;
  }

  /* Footer Optimization */
  .footer-widgets {
    gap: 30px;
  }

  .footer-widget h3 {
    font-size: 1.15rem;
  }
}

/* Extra small screens - 320px to 360px */
@media (max-width: 360px) {
  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    min-height: 40px;
  }

  .hero-buttons .btn {
    padding: 10px 12px;
  }

  .hero-buttons {
    gap: 10px;
  }

  .value-card,
  .service-card,
  .team-member,
  .bacheca-item,
  .portfolio-item {
    padding: 20px 15px;
  }

  .value-card i,
  .service-card i {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .value-card h4,
  .service-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .value-card p,
  .service-card p {
    font-size: 0.85rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }
}