/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f0f0f0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

nav h1 {
    color: #1E0342;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #1E0342;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.hamburger:hover {
    color: #1E0342;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E0342 0%, #0E46A3 100%);
    color: white;
    margin-top: 70px;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.hero-image {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 2s ease-out;
}

.hero-text {
    flex: 1;
    margin-left: 50px;
    text-align: center;
}

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #FFD700;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.cta-button {
  display: inline-block;
  background-color: #FFD700;
  color: #1E0342;
  padding: 15px 30px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  margin: 20px 0;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cta-button:hover {
  background-color: #FFC107;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sections */
section {
    padding: 80px 0;
    background-color: white;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

.about, .projects, .experience, .contact, .automation, .entrepreneurs {
  background-color: white;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 60px;
  border: 1px solid #E0E0E0;
  color: #333;
}

.section-content {
  display: flex;
  align-items: flex-start;
}

.section-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.section-text {
  flex: 2;
  padding: 0 20px;
}

.certificates-intro .section-text {
  text-align: center;
}

.reverse {
  flex-direction: row-reverse;
}

.reverse .section-text {
  padding: 0 20px;
}

.about {
  background-color: white;
  color: #333;
}

.automation {
  background-color: white;
  color: #333;
}

.entrepreneurs {
  background-color: white;
  color: #333;
}

.projects {
  background-color: white;
  color: #333;
}

.experience {
  background-color: white;
  color: #333;
}

.contact {
  background-color: white;
  color: #333;
}

/* About Section */
.about ul, .automation ul, .entrepreneurs ul {
    list-style: none;
    padding-left: 20px;
}

.about li, .automation li, .entrepreneurs li {
    margin-bottom: 10px;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Large screens: Ensure 3 cards */
@media (min-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: 8px;
    }
}

.project {
    background-color: #1E0342;
    color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s;
    border: 1px solid #E0E0E0;
}

.project:hover {
    transform: translateY(-5px);
}

.project h3 {
    color: white;
    margin-bottom: 15px;
}

/* Experience Section */
.experience-item {
    margin-bottom: 40px;
    padding: 30px;
    background-color: white;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 1px solid #E0E0E0;
    transition: background-color 0.3s, color 0.3s;
}

/* Medium and large screens: Full width containers */
@media (min-width: 768px) {
    .experience .container {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        padding: 8px;
    }

    .projects .container {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }
}

/* Projects container specific styles */
.projects .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0px 1px;
}

.experience-item:hover {
    background-color: #1E0342;
    color: white;
}

.experience-item h3 {
    color: #333;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.experience-item:hover h3 {
    color: white;
}

/* Contact Section */
.contact-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.contact-text {
  flex: 1;
  padding-right: 20px;
}

.contact-social {
  flex: 1;
  text-align: center;
}

.contact-social p {
  margin-bottom: 20px;
}

.contact-social a {
  color: #1E0342;
  text-decoration: none;
}

/* Contact Form */
.contact-form-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.text-column {
  text-align: justify;
}

.text-column p {
  margin-bottom: 20px;
}

.text-column p:last-child {
  margin-bottom: 0;
}

.form-column .contact-form {
  max-width: none;
  margin: 0;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #1E0342;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  font-size: 1rem;
}

.submit-button {
  background-color: #1E0342;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: block;
  margin: 0 auto;
}

.submit-button:hover {
  background-color: #0E46A3;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #0E46A3;
}

.hero-social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.hero-social-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.hero-social-links a:hover {
    color: #9AC8CD;
}

/* Footer */
footer {
  background-color: #1E0342;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-column {
  flex: 1;
  padding: 0 20px;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.footer-social-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-social-links a:hover {
    color: #9AC8CD;
}

.footer-content p a {
  color: #9AC8CD;
  text-decoration: underline;
  font-weight: bold;
}

.footer-content p a:hover {
  color: white;
}

/* Social Links with Icons */
.social-links a, .hero-social-links a, .footer-social-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin: 0 10px;
}

.social-links a i, .hero-social-links a i, .footer-social-links a i {
  font-size: 1.5em;
  margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    nav ul {
        margin-top: 20px;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 20px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        margin-left: 0;
        margin-top: 30px;
    }

    .hero-image {
        width: 250px;
        height: 300px;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 40px 0;
    }

    .about, .projects, .experience, .contact {
        margin: 10px;
        padding: 20px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-text h2 {
        font-size: 1.5rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 2rem;
    }
}

/* LinkedIn Button */
.libutton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7px;
    text-align: center;
    outline: none;
    text-decoration: none !important;
    color: #ffffff !important;
    width: 200px;
    height: 32px;
    border-radius: 16px;
    background-color: #0A66C2;
    font-family: "SF Pro Text", Helvetica, sans-serif;
    margin: 0 auto;
}

/* Medium screens: Form container 80% width */
@media (min-width: 768px) {
    .contact-form-section .container {
        width: 80%;
        max-width: none;
        margin: 0 auto;
    }
}

/* Enhanced small screens styles */
@media (max-width: 767px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 70px;
        padding: 0 15px;
        position: static;
    }

    .hamburger {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        margin: 0;
        padding: 20px 0;
        z-index: 1000;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        padding: 10px 20px;
        display: block;
    }

    .hero {
        height: 114vh;
        margin-top: 80px;
        padding-bottom: 20px;
    }

    .hero-content {
        padding: 20px;
        margin-top: 30px;
    }

    .hero-image {
        margin-top: 20px;
        width: 280px;
        height: 350px;
    }

    .hero-text h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .hero-text p {
        text-align: justify;
    }

    .hero-text p {
        font-size: 0.9rem;
    }

    .hero-social-links {
        margin-top: 30px;
    }

    .section-content {
        flex-direction: column;
    }

    section h2, section h3 {
        text-align: center;
        margin: 40px auto 40px;
        max-width: 95%;
    }

    .about p, .automation p, .entrepreneurs p, .contact p, .experience p, .projects p {
        text-align: justify;
        max-width: 95%;
        margin: 0 auto;
    }

    .contact-content {
        flex-direction: column;
        width: 95%;
        margin: 0 auto;
    }

    .contact-social {
        flex: 1;
        text-align: center;
        margin: auto;
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .section-image img {
        margin: 8px 0;
    }

    .hero-text, .section-text, .contact-text {
        max-width: 95%;
        margin: 0 auto;
    }

    .reverse {
        flex-direction: column;
    }

    .about, .projects, .experience, .contact, .automation, .entrepreneurs {
        margin: 20px;
        padding: 10px;
    }

    .contact-layout {
        gap: 15px;
    }

    .text-column p {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
    }

    .submit-button {
        font-size: 1rem;
        padding: 12px 25px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        margin-bottom: 20px;
    }

    .social-links, .hero-social-links, .footer-social-links {
        justify-content: center;
        gap: 15px;
    }

    .social-links {
        margin-top: 20px;
    }

    .social-links a, .hero-social-links a, .footer-social-links a {
        margin: 0 5px;
    }

    .libutton {
        width: 180px;
        height: 28px;
        font-size: 0.9rem;
    }

    .hero-text, .section-text, .contact-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .certificates-intro .section-text {
        margin: 0;
    }

    .about, .projects, .experience, .contact, .automation, .entrepreneurs, .certificates-intro {
        margin: 8px auto;
        padding: 2px;
    }

    .experience .container {
        padding: 8px;
    }

    .experience-item {
        padding: 8px;
    }
    .project h3 {
    color: #1E0342;
    margin-bottom: 15px;
}
    .project {
        background-color: white;
        color: #1E0342;
        padding: 8px;
        margin: 8px;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
        transition: transform 0.3s;
        border: 1px solid #E0E0E0;
    }
}

/* Education full width on medium and large screens */
@media (min-width: 768px) {
    .about ul {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}

/* Hero image for medium and large screens */
@media (min-width: 768px) {
    .hero-image {
        width: 363px;
        height: 532px;
    }
}

/* Medium and large screens: sections padding */
@media (min-width: 768px) {
    .about, .projects, .experience, .contact, .automation, .entrepreneurs {
        background-color: white;
        margin: 25px auto;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        padding: 13px;
        border: 1px solid #E0E0E0;
        color: #333;
    }
}

/* Large screens: projects container */
@media (min-width: 1200px) {
    .projects .container {
        max-width: 1160px;
        margin: 0 auto;
        padding: 0px 1px;
    }
}

/* Education section */
.education-section {
    width: 100%;
    text-align: center;
    margin-top: 40px;
}

.education-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.education-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.education-left {
    display: flex;
    align-items: center;
}

.education-left i {
    font-size: 1.5em;
    margin-right: 15px;
    color: #1E0342;
}

.education-left strong {
    color: #1E0342;
}

.education-right {
    text-align: right;
    color: #1E0342;
}

.education-right strong {
    display: block;
    font-size: 0.9em;
}
/* Certificates Intro Section */
.certificates-intro {
  background-color: white;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 8px;
  border: 1px solid #E0E0E0;
  color: #333;
  text-align: center;
}

.certificates-intro .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

/* Certificates Page */
.certificates-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.certificates-section .container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

/* Filters Section */
.filters-section {
  text-align: center;
  margin: 20px 0;
}

.filters-section h3 {
  margin-bottom: 10px;
  color: #1E0342;
}

.filter-pills {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.filter-pill {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 25px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.filter-pill:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.search-container {
  width: 100%;
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
}

#search {
  width: 100%;
  max-width: 1200px;
  height: 30px;
  padding: 10px 40px 10px 15px;
  border: 1px solid #1E0342;
  border-radius: 4px;
  font-size: 1rem;
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
}

.clear-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #1E0342;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  display: none;
}

.clear-btn:hover {
  color: #0E46A3;
}

.certificates-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.certificate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.img-card-certificate{
  width: 40%;
}

.certificate-card {
  background-color: white;
  border: 4px solid black;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 3px;
  text-align: center;
  transition: transform 0.3s;
  height: 347px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 30%;
  max-width: 30%;
}

.certificate-card:hover {
  transform: translateY(-5px);
  background-color: rgba(14, 70, 163, 0.4);
  cursor: pointer;
}

.certificate-card img {
  width: 100%;
  height: 215px;
  object-fit: fill;
  border-radius: 4px;
  margin-bottom: 10px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1E0342;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.img-card-certificate.loading {
  display: none;
}

/* Large screens: certificate images uniform */
@media (min-width: 768px) {
  .certificate-card img {
    width: 100%;
  }
}

.certificate-card h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: #1E0342;
}

.certificate-card p {
  font-size: 0.9rem;
  color: #666;
}

.certificate-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Responsive for certificates grid */
@media (max-width: 768px) {
  .certificate-card {
    flex: 0 0 95%;
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .certificate-card {
    flex: 0 0 95%;
    max-width: 95%;
  }
}

/* Small screens: full width for certificates */
@media (max-width: 767px) {
  .certificates-section .container {
    padding: 0;
  }

  .search-container {
    padding: 0;
  }

  .certificate-card img {
    width: 100%;
  }

  .certificate-card {
    flex: 0 0 95%;
    max-width: 95%;
  }
  
  .filters-section {
    text-align: center;
    margin: 20px 0;
  }
  
  .filters-section h3 {
    margin-bottom: 10px;
    color: #1E0342;
  }
  
  .filter-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .filter-pill {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
  }
  
  .filter-pill:hover {
    opacity: 0.8;
  }
}