/* Technologies Section Fixes */
.tech-stack {
  text-align: center;
}

.tech-stack .section-header {
  text-align: center;
}

.tech-stack .section-title {
  text-align: center;
}

.tech-stack .section-subtitle {
  text-align: center;
}

/* Override tech logo styles to show original colors */
.tech-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: none !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all var(--transition-normal);
}

.tech-logo.tech-logo-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  padding: var(--space-2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  width: 80px;
  height: 80px;
  position: relative;
  overflow: hidden;
}

.tech-logo:hover {
  filter: none !important;
  opacity: 1 !important;
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.05);
}

.tech-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none !important;
}

/* GitHub logo theme switching */
.tech-logo[data-tooltip="GitHub"] img {
  display: none;
}

.tech-logo[data-tooltip="GitHub"] {
  background-image: url('../images/logos/github-mark-white.svg');
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

.light-theme .tech-logo[data-tooltip="GitHub"] {
  background-image: url('../images/logos/github-mark.png');
}

/* Portfolio image fix */
.portfolio-img {
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  max-height: none !important;
}

.portfolio-item {
  height: auto !important;
  min-height: auto !important;
}

/* Footer 2-column layout fix */
.footer .row {
  display: flex !important;
  flex-wrap: wrap;
  margin: 0;
}

.footer .col-md-6 {
  width: 50% !important;
  padding: 0 15px;
  flex: 0 0 50%;
  max-width: 50%;
}

.footer .col-md-3 {
  display: none !important;
}

@media (max-width: 768px) {
  .footer .col-md-6 {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 2rem;
  }
}

/* Service card header layout */
.service-card .service-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.service-card .service-header .service-icon {
  margin-right: 0;
  margin-bottom: 0;
  flex-shrink: 0;
}

.service-card .service-header h3 {
  margin: 0;
  flex: 1;
  max-width: none;
  line-height: 1.3;
  font-size: 1.25rem;
}

/* Wider service cards */
.service-card {
  max-width: none !important;
  flex: 1 1 300px;
}

.services-grid {
  gap: 2rem !important;
}

/* Section title spacing */
.section-title {
  margin-bottom: 2.5rem !important;
}

/* Featured service with right-aligned image */
.featured-service {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.featured-service .service-content {
  flex: 1;
}

.featured-service .service-image {
  height: 366px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  padding: 20px;
  background-color: var(--color-surface);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.featured-service > p,
.featured-service > .service-details {
  margin-left: 0;
  padding-left: 0;
}

.featured-service .service-details {
  margin-left: 0;
  padding-left: 0;
}

@media (max-width: 768px) {
  .featured-service {
    flex-direction: column;
  }
  
  .featured-service .service-image {
    height: 250px;
    align-self: center;
    padding: 15px;
  }
  
  .service-card .service-header h3 {
    font-size: 1.1rem;
  }
}

/* Hero section padding and layout fixes */
.hero {
  padding: 100px 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0c091a 0%, #1b102e 30%, #131226 70%, #111927 100%);
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(12, 9, 26, 0.9) 0%, rgba(27, 16, 46, 0.7) 30%, rgba(19, 18, 38, 0.8) 70%, rgba(17, 25, 39, 0.9) 100%);
  pointer-events: none;
}

/* Force white text in hero section regardless of theme */
.hero,
.hero *,
.hero .hero-title,
.hero .hero-subtitle,
.hero .hero-point span {
  color: #ffffff !important;
}

/* Tech logo specific styling with higher specificity */
/* OpenAI and Pinecone - black on bright mode, white on dark mode */
body .tech-logo-wall .tech-logo .tech-img[src*="openai"],
body .tech-logo-wall .tech-logo .tech-img[src*="Pinecone-logo"] {
  filter: brightness(0) !important; /* Black for bright mode */
}

/* White on dark mode */
body[class*="dark"] .tech-logo-wall .tech-logo .tech-img[src*="openai"],
body[class*="dark"] .tech-logo-wall .tech-logo .tech-img[src*="Pinecone-logo"],
body:not([class*="light"]) .tech-logo-wall .tech-logo .tech-img[src*="openai"],
body:not([class*="light"]) .tech-logo-wall .tech-logo .tech-img[src*="Pinecone-logo"] {
  filter: brightness(0) invert(1) !important; /* White for dark mode */
}

/* Gemini logo bigger */
.tech-logo-wall .tech-logo .tech-img[src*="Gemini-logo"] {
  height: 60px !important;
  width: auto !important;
  max-height: 60px !important;
}

/* Amazon logo styling for new SVG files */
.tech-logo-wall .tech-logo .tech-img[src*="amazon-bright-b"] {
  height: 60px !important;
  width: auto !important;
  max-height: 60px !important;
}

.tech-logo-wall .tech-logo .tech-img[src*="amazon-dark-b"] {
  height: 60px !important;
  width: auto !important;
  max-height: 60px !important;
}

.hero-content-wide {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 50%;
}

.hero-image {
  flex: 1;
  max-width: 50%;
  text-align: center;
}

.hero-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #20c997, #0d6efd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--color-text-secondary);
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
}

.hero-point i {
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 0;
    min-height: 70vh;
  }
  
  .hero-content-wide {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  
  .hero-text,
  .hero-image {
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-points {
    text-align: left;
  }
}

/* Social links styling */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  align-items: center;
}

.social-links a {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 20px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  color: #20c997;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  transform: translateY(-2px) scale(1.1);
}

.social-links img {
  filter: opacity(0.7);
  transition: all 0.3s ease;
}

.social-links a:hover img {
  filter: opacity(1);
}

/* Logo styling */
.nav-logo, .footer-logo {
  color: var(--primary);
  transition: all 0.3s ease;
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  0% {
    color: var(--primary);
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
  }
  100% {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  }
}

/* Contact page layout */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

/* Calendar section styling */
.calendar-section {
  background: var(--color-card);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.calendar-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.calendar-title i {
  color: #95bf46;
}

.appointment-scheduler {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  background: var(--color-bg);
  position: relative;
}

/* Dark mode iframe styling - JavaScript controlled */
[data-theme="dark"] .appointment-scheduler {
  background: #1a1a1a;
  border-color: #333;
}

.appointment-scheduler.dark-mode iframe {
  background: #1a1a1a !important;
  filter: invert(1) hue-rotate(180deg);
}

/* Fallback dark styling */
[data-theme="dark"] .appointment-scheduler iframe {
  background: #1a1a1a !important;
}

.calendar-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calendar-info p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-secondary);
  margin: 0;
}

.calendar-info i {
  color: var(--primary);
  width: 16px;
}

.calendar-booking-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.calendar-booking-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  text-decoration: none;
  color: white;
}

/* Contact form wrapper */
.contact-form-wrapper {
  background: var(--color-card);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.form-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.form-title i {
  color: #95bf46;
}

/* Contact form styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
}

.form-control {
  padding: 0.875rem 1rem;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--color-background);
  color: var(--color-text);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #374151;
  border: none;
  color: white;
  cursor: pointer;
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(55, 65, 81, 0.3);
  background: #4b5563;
}

.btn-send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Form message styling */
.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-message.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Calendar Booking Styles */
.booking-calendar {
  background: var(--color-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.current-month {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.nav-btn {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text);
}

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

.calendar-grid {
  margin-bottom: 1.5rem;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 0.5rem;
}

.weekday {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.day.empty {
  cursor: default;
}

.day.past {
  color: var(--color-text-secondary);
  opacity: 0.5;
  cursor: not-allowed;
}

.day.weekend {
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.day.available {
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid var(--color-border);
}

.day.available:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.day.today {
  background: var(--accent);
  color: var(--color-text);
  font-weight: 600;
}

.day.selected {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

.time-slots-section {
  margin-bottom: 1.5rem;
}

.time-slots-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
}

.time-slot {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background);
  color: var(--color-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-slot:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.time-slot.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.booking-form h4 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.datetime-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-weight: 500;
}

.datetime-display i {
  color: var(--primary);
}

.booking-form .form-group {
  margin-bottom: 1rem;
}

.booking-form input,
.booking-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background);
  color: var(--color-text);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.booking-form input:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-cancel,
.btn-book {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-cancel {
  background: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-cancel:hover {
  background: var(--color-border);
}

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

.btn-book:hover {
  background: var(--accent);
}

/* Responsive design */
@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .calendar-embed iframe {
    height: 400px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .time-slots {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  }
  
  .form-actions {
    flex-direction: column;
  }
}