/**
 * ISCASTLE Improvements CSS
 * Additional styles for better UX, accessibility, and modern design
 */

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.3s;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators */
*:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* ===== FORM IMPROVEMENTS ===== */

/* Ensure all form inputs use black font color */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select,
.message-box {
  color: #000000 !important;
}

.form-group {
  margin-bottom: 1rem;
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  color: #000000;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #007bff;
  outline: none;
  color: #000000;
}

.form-group input:invalid,
.form-group textarea:invalid {
  border-color: #dc3545;
  color: #000000;
}

.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 4px;
  display: none;
}

.submit-status {
  margin-top: 1rem;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 500;
}

.submit-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.submit-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.submit-status.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ===== SERVICE CARDS IMPROVEMENTS ===== */

.service-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.service-card:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.service-image {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
}

.service-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.service-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.25rem;
  font-weight: 600;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.service-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 20px;
}

.service-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.service-list li:last-child {
  border-bottom: none;
}

/* ===== CONTACT INFO IMPROVEMENTS ===== */

.contact-info {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  height: 100%;
}

.contact-info h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-item .img-box {
  margin-right: 15px;
  margin-top: 5px;
}

.contact-item i {
  font-size: 20px;
  color: #007bff;
}

.contact-item h4 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 1rem;
}

.contact-item p {
  margin: 0;
  color: #666;
}

.contact-item a {
  color: #007bff;
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* ===== HERO SECTION IMPROVEMENTS ===== */

.hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

/* ===== SECTION IMPROVEMENTS ===== */

.services-subtitle,
.contact-subtitle {
  color: #666;
  font-size: 1.1rem;
  margin-top: 10px;
  text-align: center;
}

/* ===== FOOTER IMPROVEMENTS ===== */

.footer-bottom {
  background: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #007bff;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  background: #0056b3;
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */

@media (max-width: 768px) {
  .service-card {
    margin-bottom: 20px;
  }
  
  .contact-info {
    margin-top: 30px;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .cta-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .service-content {
    padding: 15px;
  }
  
  .service-image {
    padding: 15px;
  }
  
  .contact-info {
    padding: 15px;
  }
}

/* ===== LOADING STATES ===== */

.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy.loaded {
  opacity: 1;
}

/* ===== ANIMATION IMPROVEMENTS ===== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card {
  animation: fadeInUp 0.6s ease-out;
}

.service-card:nth-child(2) {
  animation-delay: 0.1s;
}

.service-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* ===== PRINT STYLES ===== */

@media print {
  .navbar,
  .social-box,
  .footer-bottom {
    display: none;
  }
  
  .service-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
