/* A-Z Sopa de Letras - Main Stylesheet */

/* CSS Variables */
:root {
  --primary-green: #4CAF50;
  --primary-dark: #2E7D32;
  --primary-light: #81C784;
  --accent-blue: #2196F3;
  --accent-orange: #FF9800;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
  --border-radius: 8px;
}

/* Theme Colors */
.theme-green {
  --theme-color: var(--primary-green);
  --theme-dark: var(--primary-dark);
}

.theme-blue {
  --theme-color: #2196F3;
  --theme-dark: #1565C0;
}

.theme-orange {
  --theme-color: #FF9800;
  --theme-dark: #E65100;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Language Switcher */
.language-switcher {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  display: inline-block;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.brand-block:hover {
  transform: translateY(-2px);
}

.brand-block img {
  width: 55px;
  height: 55px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.brand-block:hover img {
  transform: rotate(360deg) scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-text .top-line {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

.brand-text .bottom-line {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  opacity: 0.95;
  letter-spacing: 0.5px;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: background-color 0.3s;
  white-space: nowrap;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Page Title */
.page-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-green);
  font-weight: 600;
}

/* Intro Block */
.intro-block {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.intro-block p {
  margin-bottom: 0.75rem;
}

.intro-block p:last-child {
  margin-bottom: 0;
}

/* Form Styles */
.generator-form {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.generator-form h2 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: var(--bg-white);
  line-height: 1.5;
}

input[type="text"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: #c0c0c0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--theme-color, var(--primary-green));
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* Buttons */
.btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--theme-color, var(--primary-green)) 0%, var(--theme-dark, var(--primary-dark)) 100%);
  color: white;
}

.btn-primary:hover {
  opacity: 0.95;
}

.btn-secondary {
  background: #f5f5f5;
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.result-section .button-group {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.generator-form .btn {
  width: 100%;
  justify-content: center;
}

/* Loading Spinner */
.loading-spinner {
  display: none;
  text-align: center;
  padding: 2rem;
}

.loading-spinner.active {
  display: block;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--theme-color, var(--primary-green));
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Result Section */
.result-section {
  display: none;
  margin-top: 2rem;
}

.result-section.active {
  display: block;
}

.puzzle-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-green);
}

.puzzle-container {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.puzzle-grid {
  display: grid;
  gap: 2px;
  margin-bottom: 1.5rem;
  background: #e0e0e0;
  border: 2px solid #ccc;
  padding: 2px;
  max-width: 100%;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  min-width: min-content;
}

.puzzle-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  font-weight: 600;
  font-size: clamp(0.6rem, 2vw, 1rem);
  color: var(--text-dark);
  transition: background-color 0.3s;
  min-width: 22px;
  min-height: 22px;
  width: 100%;
  height: 100%;
}

.puzzle-cell.highlight {
  background: #ffeb3b;
}

.word-list {
  margin-top: 1rem;
}

.word-list h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-green);
  font-size: 1.1rem;
  font-weight: 600;
}

.word-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.word-item {
  background: var(--bg-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  display: inline-block;
  line-height: 1.4;
}

/* Info Cards */
.info-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.info-card h2 {
  color: var(--primary-green);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.info-card h3 {
  color: var(--primary-green);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.info-card p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.info-card a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.3s;
}

.info-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.info-card ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.info-card li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* FAQ */
.faq-item {
  margin-bottom: 1.5rem;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
}

.faq-answer {
  color: var(--text-light);
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.category-card {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card h3 {
  color: var(--primary-green);
  margin-bottom: 0.75rem;
}

/* Category PDF Cards */
.category-pdf-card {
  background: var(--bg-white);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-pdf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pdf-icon {
  width: 48px;
  height: 60px;
  background: var(--primary-green);
  border-radius: 4px;
  position: relative;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
}

.category-pdf-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.pdf-subtitle {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.category-pdf-card .btn {
  width: 100%;
  max-width: 180px;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
}

/* Printables */
.printables-section {
  margin-bottom: 3rem;
}

.printables-section h2 {
  text-align: center;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.emoji-box {
  aspect-ratio: 1;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.emoji-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.emoji-box .emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.emoji-box .number {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* PDF Cards */
.pdf-card {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.pdf-card h3 {
  color: var(--primary-green);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.pdf-card input {
  margin-bottom: 1rem;
}

.pdf-card .btn {
  width: 100%;
}

/* Category List */
.category-list {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.category-list h2 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  text-align: center;
}

.category-list ol {
  padding-left: 2rem;
}

.category-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Template Lines */
.template-lines {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.template-lines h2 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  text-align: center;
}

.template-lines ol {
  padding-left: 2rem;
}

.template-lines li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Contact Info */
.contact-info {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contact-info h2 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.contact-info h3 {
  color: var(--primary-green);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.contact-info p {
  margin-bottom: 0.875rem;
  line-height: 1.6;
}

.contact-info p strong {
  color: var(--text-dark);
  font-weight: 600;
}

.contact-info a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.social-link {
  padding: 0.75rem 1.25rem;
  background: white;
  color: var(--text-dark);
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  min-width: 140px;
  justify-content: center;
}

.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-link:active {
  transform: translateY(-1px);
}

/* Individual social media brand colors */
.social-link.facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: white;
}

.social-link.twitter:hover {
  background: #000000;
  border-color: #000000;
  color: white;
}

.social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #dc2743;
  color: white;
}

.social-link.pinterest:hover {
  background: #E60023;
  border-color: #E60023;
  color: white;
}

/* Social Section at Bottom */
.social-section {
  max-width: 700px;
  margin: 3rem auto 2rem;
  text-align: center;
  padding: 0 1.5rem;
}

.social-heading {
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  text-align: center;
}

.social-links-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.social-icon-small {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

.social-link-small:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-link-small:active {
  transform: translateY(-1px);
}

/* Small Social Icons - Brand Colors */
.social-link-small.facebook .social-icon-small {
  color: #1877F2;
}

.social-link-small.facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
}

.social-link-small.facebook:hover .social-icon-small {
  color: white;
}

.social-link-small.twitter .social-icon-small {
  color: #1DA1F2;
}

.social-link-small.twitter:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
}

.social-link-small.twitter:hover .social-icon-small {
  color: white;
}

.social-link-small.instagram .social-icon-small {
  color: #E4405F;
}

.social-link-small.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #E4405F;
}

.social-link-small.instagram:hover .social-icon-small {
  color: white;
}

.social-link-small.pinterest .social-icon-small {
  color: #E60023;
}

.social-link-small.pinterest:hover {
  background: #E60023;
  border-color: #E60023;
}

.social-link-small.pinterest:hover .social-icon-small {
  color: white;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-links a:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

/* Footer Secondary Links (Legal Pages) */
.footer-secondary-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-secondary-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 400;
  font-size: 0.85rem;
}

.footer-secondary-links a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

/* Footer Social Icons */
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.footer-social-icon {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

.footer-social-link:hover {
  transform: scale(0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.footer-social-link:active {
  transform: scale(0.85);
}

/* Footer Social - Brand Colors Always Visible */
.footer-social-link.facebook .footer-social-icon {
  color: #1877F2;
}

.footer-social-link.facebook:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: #1877F2;
}

.footer-social-link.twitter .footer-social-icon {
  color: #1DA1F2;
}

.footer-social-link.twitter:hover {
  background: rgba(29, 161, 242, 0.2);
  border-color: #1DA1F2;
}

.footer-social-link.instagram .footer-social-icon {
  color: #E4405F;
}

.footer-social-link.instagram:hover {
  background: rgba(228, 64, 95, 0.2);
  border-color: #E4405F;
}

.footer-social-link.pinterest .footer-social-icon {
  color: #E60023;
}

.footer-social-link.pinterest:hover {
  background: rgba(230, 0, 35, 0.2);
  border-color: #E60023;
}

.copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 400;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Print-only elements - hidden by default */
.print-only {
  display: none;
}

/* Print Styles */
@media print {
  /* Hide navigation, buttons, and info cards */
  header,
  nav,
  footer,
  .no-print,
  .button-group,
  .intro-block,
  .info-card,
  .generator-form,
  .loading-spinner {
    display: none !important;
  }

  /* Show print-only elements */
  .print-only {
    display: block !important;
  }

  /* Print header with branding */
  .print-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4CAF50;
  }

  /* Print footer with branding */
  .print-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #4CAF50;
  }

  /* Body and main adjustments */
  body {
    background: white !important;
    margin: 0;
    padding: 0;
  }

  main {
    margin: 0 !important;
    padding: 1rem !important;
    max-width: 100% !important;
  }

  /* Result section */
  .result-section {
    display: block !important;
    margin: 0 !important;
  }

  /* Puzzle title */
  .puzzle-title {
    font-size: 1.5rem !important;
    margin: 1rem 0 !important;
    color: #4CAF50 !important;
    text-align: center;
  }

  /* Puzzle container */
  .puzzle-container {
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 1rem !important;
    margin: 0 auto !important;
    page-break-inside: avoid;
  }

  /* Puzzle grid */
  .puzzle-grid {
    page-break-inside: avoid;
    margin: 0 auto 1.5rem !important;
  }

  /* Word list */
  .word-list {
    page-break-inside: avoid;
    margin-top: 1.5rem !important;
  }

  .word-list h3 {
    color: #4CAF50 !important;
    font-size: 1.1rem !important;
  }

  .word-item {
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Ensure colors print correctly */
  .puzzle-cell {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .puzzle-cell.highlight {
    background: #ffeb3b !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Page breaks */
  .page-break {
    page-break-after: always;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  /* Tablet & Medium Screens */
  .contact-info {
    max-width: 100%;
  }

  .generator-form {
    max-width: 100%;
  }

  .social-links {
    flex-wrap: wrap;
  }

  .social-link {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 150px;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }

  nav {
    gap: 0.75rem;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }

  .language-switcher {
    top: 0.75rem;
    right: 1rem;
    gap: 0.4rem;
  }

  .lang-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .brand-block {
    gap: 0.75rem;
  }

  .brand-block img {
    width: 45px;
    height: 45px;
  }

  .brand-text .top-line {
    font-size: 1.3rem;
    letter-spacing: 1.5px;
  }

  .brand-text .bottom-line {
    font-size: 1.05rem;
  }

  .generator-form {
    padding: 1.5rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .result-section .button-group .btn {
    width: 100%;
    min-height: 48px;
  }

  .puzzle-container {
    padding: 1rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .puzzle-grid {
    gap: 1px;
    padding: 1px;
  }

  .puzzle-cell {
    font-size: clamp(0.65rem, 2vw, 0.9rem);
    min-width: 20px;
    min-height: 20px;
  }

  .word-list-items {
    gap: 0.4rem;
  }

  .word-item {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .emoji-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }

  .emoji-box {
    padding: 0.5rem;
  }

  .emoji-box .emoji {
    font-size: 1.5rem;
  }

  .emoji-box .number {
    font-size: 0.9rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-pdf-card {
    padding: 1.5rem 1rem;
  }

  /* Contact Page Mobile Styles */
  .contact-info {
    padding: 1.5rem;
  }

  .contact-info h2 {
    font-size: 1.3rem;
  }

  .contact-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.875rem;
  }

  .social-section {
    margin: 2.5rem auto 1.5rem;
    padding: 0 1rem;
  }

  .social-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .social-link-small {
    width: 34px;
    height: 34px;
  }

  .social-icon-small {
    width: 17px;
    height: 17px;
  }

  .contact-info p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .social-links {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
  }

  .social-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 130px;
  }

  .social-icon {
    width: 18px;
    height: 18px;
  }

  .generator-form h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  label {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 1rem;
    padding: 0.875rem;
    min-height: 48px;
  }

  textarea {
    min-height: 140px;
  }

  .info-card h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .info-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .footer-links {
    gap: 1.5rem;
    font-size: 0.9rem;
  }

  .footer-social {
    gap: 0.875rem;
    margin: 1.75rem 0 1.25rem;
  }

  .footer-social-link {
    width: 34px;
    height: 34px;
  }

  .footer-social-icon {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 600px) {
  /* Large phones */
  .contact-info h2 {
    font-size: 1.25rem;
  }

  .contact-info h3 {
    font-size: 1.15rem;
  }

  .social-links {
    gap: 0.75rem;
  }

  .social-link {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0.875rem 1.25rem;
  }

  .social-icon {
    width: 20px;
    height: 20px;
  }

  .generator-form h2 {
    font-size: 1.3rem;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    padding: 0.875rem 0.75rem;
  }

  .social-section {
    margin: 2rem auto 1.5rem;
  }

  .social-heading {
    font-size: 0.95rem;
  }

  .social-link-small {
    width: 34px;
    height: 34px;
  }

  .social-icon-small {
    width: 17px;
    height: 17px;
  }

  .puzzle-container {
    padding: 0.75rem;
  }

  .puzzle-grid {
    gap: 1px;
    padding: 1px;
    border: 1px solid #ccc;
  }

  .puzzle-cell {
    font-size: clamp(0.6rem, 1.8vw, 0.8rem);
    min-width: 18px;
    min-height: 18px;
    font-weight: 500;
  }

  .word-list h3 {
    font-size: 1rem;
  }

  .footer-links {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .footer-social {
    margin: 1.5rem 0;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .intro-block,
  .generator-form,
  .info-card {
    padding: 1rem;
  }

  nav {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .brand-block {
    gap: 0.65rem;
  }

  .brand-block img {
    width: 42px;
    height: 42px;
  }

  .brand-text .top-line {
    font-size: 1.15rem;
    letter-spacing: 1px;
  }

  .brand-text .bottom-line {
    font-size: 0.95rem;
  }

  .puzzle-container {
    padding: 0.5rem;
  }

  .puzzle-grid {
    gap: 1px;
    padding: 1px;
    border: 1px solid #ccc;
  }

  .puzzle-cell {
    font-size: clamp(0.55rem, 1.5vw, 0.75rem);
    min-width: 16px;
    min-height: 16px;
    font-weight: 500;
  }

  .puzzle-title {
    font-size: 1.2rem;
  }

  .word-list h3 {
    font-size: 0.95rem;
  }

  .word-list-items {
    gap: 0.35rem;
  }

  .word-item {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }

  .emoji-grid {
    gap: 0.25rem;
  }

  .emoji-box .emoji {
    font-size: 1.2rem;
  }

  .emoji-box .number {
    font-size: 0.8rem;
  }

  .category-pdf-card {
    padding: 1.25rem 0.75rem;
  }

  .category-pdf-card h3 {
    font-size: 0.95rem;
  }

  .pdf-subtitle {
    font-size: 0.8rem;
  }

  .category-pdf-card .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  /* Contact Page Small Mobile Styles */
  .contact-info {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .contact-info h2 {
    font-size: 1.2rem;
  }

  .contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .social-section {
    margin: 1.5rem auto 1rem;
    padding: 0 0.75rem;
  }

  .social-heading {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .social-links-bottom {
    gap: 0.875rem;
  }

  .social-link-small {
    width: 34px;
    height: 34px;
  }

  .social-icon-small {
    width: 17px;
    height: 17px;
  }

  .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
  }

  .contact-info a {
    word-break: break-word;
    font-size: 0.9rem;
  }

  .social-links {
    flex-direction: column;
    gap: 0.65rem;
  }

  .social-link {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    gap: 0.65rem;
  }

  .social-icon {
    width: 22px;
    height: 22px;
  }

  .generator-form h2 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  label {
    font-size: 0.9rem;
    font-weight: 500;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 1rem;
    padding: 0.875rem 0.75rem;
    border-width: 2px;
  }

  textarea {
    min-height: 160px;
  }

  .btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    min-height: 50px;
  }

  .info-card h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
  }

  .info-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.875rem;
  }

  .info-card a {
    word-break: break-word;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    font-size: 0.85rem;
  }

  .footer-social {
    margin: 1.5rem 0 1.25rem;
    gap: 0.75rem;
  }

  .copyright {
    font-size: 0.8rem;
    line-height: 1.6;
    padding-top: 1.25rem;
    margin-top: 0.25rem;
  }
}

