/* ===========================
   Animation Keyframes
=========================== */

/* Apply light and dark theme button */
:root {
  --bg-color: #ffffff;
  --text-color: #1f2937;
  --card-bg: #f3f4f6;
  --accent-color: #2563eb;
}

body.dark-theme {
  --bg-color: #1f2937;
  --text-color: #f9fafb;
  --card-bg: #374151;
  --accent-color: #f97316;
}

/* Apply variables */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.card {
  background-color: var(--card-bg);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-color);
  margin-left: 1rem;
}

/* Fade in from opacity 0 to 1 */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fade in and slide up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Float animation for icons */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* Rotate animation */
@keyframes rotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   Global Styles & Resets
=========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Reusable container */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

/* ===========================
   Header Section
=========================== */

.header {
  background-color: #2563eb;
  color: white;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header nav a {
  margin-left: 1rem;
  color: white;
  text-decoration: none;
}

.header nav a:hover {
  text-decoration: underline;
}

/* ===========================
   Hero Section
=========================== */

.hero {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero button {
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

/* ===========================
   Section & Cards
=========================== */

.section {
  padding: 4rem 1rem;
  text-align: center;
}

.light-bg {
  background-color: #f3f4f6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,123,255,0.4);
}

.card:hover h4,
.card:hover p {
  color: #2563eb;
  text-shadow: 0 0 5px rgba(37, 99, 235, 0.6);
}

/* ===========================
   Portfolio Items
=========================== */

.portfolio-box {
  height: 150px;
  background-color: #d1d5db;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-box img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.portfolio-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.8rem;
  transition: transform 0.3s ease;
}

.portfolio-img:hover {
  transform: scale(1.08);
}

/* Portfolio hover effects */
.portfolio-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,123,255,0.4);
}

.portfolio-box h4 {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: #2563eb;
}

/* ===========================
   Forms
=========================== */

form, .signup-form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input, form textarea,
.signup-form input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

form button {
  padding: 0.75rem;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.form-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

form-message {
  margin-top: 0.75rem;
  font-weight: 500;
  text-align: center;
  font-size: 1rem;
}

/* ===========================
   Buttons & Utilities
=========================== */

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-secondary {
  background-color: #f3f3f3;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.btn-secondary:hover {
  background-color: #2563eb;
  color: white;
}

.hidden {
  display: none;
}

/* ===========================
   User Section
=========================== */

.user-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-icon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.6rem;
  font-size: 0.95rem;
  font-weight: bold;
  color: #2563eb;
  background-color: #e0eaff;
  border-radius: 999px;
  height: 36px;
  line-height: 36px;
}

.user-icon::before {
  content: "📧";
  font-size: 1.2rem;
}

.logout-btn {
  background-color: #f87171;
  color: white;
  border: none;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #ef4444;
}

/* ===========================
   Icon Animations
=========================== */

.service-icon {
  margin-bottom: 0.5rem;
  color: #2563eb;
}

.icon-seo {
  animation: float 2s ease-in-out infinite;
}

.icon-social {
  animation: pulse 1.5s ease-in-out infinite;
}

.icon-content {
  animation: rotate 3s linear infinite;
}

/* ===========================
   Footer
=========================== */

.footer {
  background-color: #2563eb;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* ===========================
   Animation Classes
=========================== */

.fade-in-up {
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.fade-in {
  animation: fadeIn 1.5s ease forwards;
  opacity: 0;
}

/* Delay modifiers for animation sequencing */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }