/* Variables */
:root {
  --primary-color: #0f172a; /* slate-900 */
  --secondary-color: #1e293b; /* slate-800 */
  --accent-color: #FD7903; /* vibrant orange */
  --text-color: #0f172a;
  --muted-text: #475569; /* slate-600 */
  --light-gray: #f5f5f5;
  --dark-gray: #334155; /* slate-700 */
  --light-bg: #f8fafc; /* slate-50 */
  --white: #fff;
  --text-on-dark: #ffffff; /* Text alb pe fundal închis */
  --text-on-light: #0f172a; /* Text închis pe fundal deschis */
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --transition: all 0.3s ease;
  --transition-speed: 0.3s;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  /* Aliases for navbar styles (keep in sync with site theme) */
  --color-primary: var(--primary-color);
  --color-accent: var(--accent-color);
  --color-bg: var(--white);
  --text: var(--text-color);
  --muted-contrast: rgba(15, 23, 36, 0.06);
}

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

html {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.65;
  color: var(--text-color);
  background-color: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

main {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-color);
}

p {
  color: var(--muted-text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Common Components */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

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

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

/* Section Styles */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  color: var(--muted-text);
}

/* Global CTA Section - Now integrated in footer */
.cta-section {
  padding: 60px 0 40px 0;
  text-align: center;
  background-color: #000000;
  color: #ffffff;
}

.cta-section .section-title {
  color: #ffffff;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.cta-section .btn {
  background-color: var(--accent-color);
  color: #000000;
  border: 2px solid var(--accent-color);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cta-section .btn:hover {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.cta-section .btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.cta-section .btn-secondary:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Global Footer */
footer {
  background-color: #000000;
  color: #ffffff;
  padding: 0 0 20px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
  align-items: start;
}

.footer-info h3 {
  margin-bottom: 10px;
  color: #ffffff;
}

.footer-contact p {
  margin-bottom: 10px;
}

.footer-contact i {
  margin-right: 10px;
  color: #ffffff;
}

.footer-contact a {
  color: #ffffff;
  text-decoration: none;
}

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

.footer-contact p {
  display: flex;
  align-items: center;
}

.footer-links h4 {
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 1rem 30px 1rem;
  }

  .footer-info,
  .footer-links {
    margin-bottom: 20px;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  .footer-contact p {
    justify-content: center;
    display: flex;
    align-items: center;
  }

  .footer-links ul {
    padding: 0;
  }

  .footer-links li {
    margin-bottom: 5px;
  }

  .footer-bottom {
    text-align: center;
    padding: 15px 1rem;
  }

  .cta-section .cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .cta-section .btn {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto;
  }
  
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px;
  z-index: 100;
  transition: top var(--transition-speed);
}

.skip-link:focus {
  top: 0;
}

/* Focus styles */
:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn var(--transition-speed) ease-in;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Loading animation */
.loading {
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000;
    --secondary-color: #0066cc;
    --text-color: #000;
    --light-gray: #fff;
    --dark-gray: #000;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Page Headers - Modern Design */
.page-header,
.contact-hero,
.projects-hero,
.gallery-hero {
  position: relative;
  background: var(--accent-color);
  color: #000000;
  text-align: center;
  padding: 6rem 2rem 4rem;
  margin: 0;
  margin-top: 0;
  overflow: hidden;
}

/* Remove overlay for yellow background */


.page-header .container,
.contact-hero .container,
.projects-hero .container,
.gallery-hero .container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.page-header h1,
.contact-hero h1,
.projects-hero h1,
.gallery-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #000000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
}

.page-header h1::after,
.contact-hero h1::after,
.projects-hero h1::after,
.gallery-hero h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #000000, transparent);
  border-radius: 2px;
}

.page-header p,
.contact-hero p,
.projects-hero p,
.gallery-hero p {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
}

/* Decorative elements */
.page-header::after,
.contact-hero::after,
.projects-hero::after,
.gallery-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  border-radius: 2px;
  z-index: 2;
}

/* Responsive design for page headers */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 16px;
    min-height: 48px;
  }
  
  .page-header,
  .contact-hero,
  .projects-hero,
  .gallery-hero {
    padding: 4rem 1rem 3rem;
    text-align: center;
    margin: 0;
    margin-top: 0;
  }

  .page-header h1,
  .contact-hero h1,
  .projects-hero h1,
  .gallery-hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .page-header p,
  .contact-hero p,
  .projects-hero p,
  .gallery-hero p {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cta-section .btn {
    width: 100%;
    max-width: 300px;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .page-header,
  .contact-hero,
  .projects-hero,
  .gallery-hero {
    padding: 3rem 0.75rem 2rem;
    margin: 0;
    margin-top: 0;
  }

  .page-header h1,
  .contact-hero h1,
  .projects-hero h1,
  .gallery-hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .page-header p,
  .contact-hero p,
  .projects-hero p,
  .gallery-hero p {
    font-size: 1rem;
  }
  
  /* Footer optimizations for small screens */
  .footer-content {
    padding: 0 0.75rem 25px 0.75rem;
  }
  
  .footer-info h3 {
    font-size: 1.2rem;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  .footer-contact p {
    justify-content: center;
    display: flex;
    align-items: center;
  }
  
  .footer-contact a {
    font-size: 0.9rem;
  }
  
  .footer-links h4 {
    font-size: 1rem;
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
  
  .cta-section .btn {
    max-width: 280px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
  
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }
}
