/* Toast Container */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

/* Toast Styles */
.toast {
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--green);
}

.toast-error {
    border-left: 4px solid var(--red);
}

.toast-info {
    border-left: 4px solid var(--blue);
}

.toast-body {
    padding: 1rem 1.25rem;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--dark);
}

.btn-close-success {
    background: var(--green);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-close-error {
    background: var(--red);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-close-info {
    background: var(--blue);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-close-success:hover,
.btn-close-error:hover,
.btn-close-info:hover {
    opacity: 0.8;
}

/* Alert styling */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: 12px;
    position: relative;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(22, 163, 74, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--green);
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(185, 28, 28, 0.1));
    border-color: rgba(220, 53, 69, 0.3);
    color: var(--red);
}

.alert strong {
    font-weight: 700;
    display: inline-block;
    margin: 0.5rem 0;
}

/* Spinner for form submission */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.75rem;
    height: 0.75rem;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.me-2 {
    margin-right: 0.5rem;
}

/* Contact Page Specific Styles */
.contact-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.contact-item {
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.6;
}

.contact-link {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--blue);
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.social-facebook {
    background: #1877f2;
}

.social-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-youtube {
    background: #ff0000;
}

.social-twitter {
    background: #000000;
}

.social-whatsapp {
    background: #25d366;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.contact-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form .form-control {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

#contact-hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
    color: white;
}

#contact-info {
    padding: 5rem 0;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

#contact-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(124, 58, 237, 0.05) 100%);
}

#contact-faq {
    padding: 5rem 0;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Certificates Section Styles */
#certificates {
    padding: 5rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.certificate-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.certificate-image {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(79, 70, 229, 0.1));
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-image img {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    max-height: 220px;
    object-fit: contain;
    width: 100%;
}

.certificate-image img:hover {
    transform: scale(1.05);
}

.certificate-info {
    padding: 1.5rem;
    text-align: center;
}

.certificate-info h4 {
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.certificate-info p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Certificate Modal Styles */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.certificate-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.certificate-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
}

.certificate-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.certificate-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
}

.certificate-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.certificate-modal-body {
    padding: 2rem;
    text-align: center;
    max-height: calc(90vh - 120px);
    overflow: auto;
}

.certificate-modal-body img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .contact-card {
        padding: 1.5rem;
    }

    .certificate-info {
        padding: 1rem;
    }

    .contact-form-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* Hero section responsive */
    #contact-hero {
        padding: 4rem 0;
    }

    .hero-h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-sub {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Contact cards responsive */
    .contact-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-item {
        font-size: 0.9rem;
    }

    /* Social links responsive */
    .social-links {
        justify-content: center;
        gap: 0.75rem;
    }

    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Form responsive */
    .contact-form-card {
        padding: 1.5rem;
    }

    .contact-form .form-control {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    .contact-form .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }

    /* FAQ responsive */
    .faq-question {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .faq-answer-inner {
        font-size: 0.9rem;
    }

    /* Certificates responsive */
    .certificate-card {
        margin-bottom: 1rem;
    }

    .certificate-image {
        min-height: 180px;
        padding: 0.75rem;
    }

    .certificate-info {
        padding: 1rem;
    }

    .certificate-info h4 {
        font-size: 1rem;
    }

    .certificate-info p {
        font-size: 0.85rem;
    }

    /* Modal responsive */
    .certificate-modal-content {
        max-width: 95%;
        max-height: 95%;
        margin: 1rem;
    }

    .certificate-modal-header {
        padding: 1rem;
    }

    .certificate-modal-header h3 {
        font-size: 1.1rem;
    }

    .certificate-modal-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.5rem;
    }

    /* Hero mobile */
    #contact-hero {
        padding: 3rem 0;
    }

    .hero-h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    /* Contact cards mobile */
    .contact-card {
        padding: 1rem;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
    }

    .contact-item {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Form mobile */
    .contact-form-card {
        padding: 1rem;
    }

    .contact-form .row {
        margin: 0;
    }

    .contact-form .col-md-6,
    .contact-form .col-12 {
        padding: 0.25rem 0;
    }

    .contact-form .form-control {
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
    }

    .contact-form .form-label {
        font-size: 0.85rem;
    }

    .contact-form select.form-control {
        height: auto;
        min-height: 2.5rem;
    }

    /* Social links mobile */
    .social-links {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .social-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        text-align: center;
    }

    /* FAQ mobile */
    .faq-question {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .faq-answer-inner {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    /* Certificates mobile */
    .certificate-image {
        min-height: 150px;
        padding: 0.5rem;
    }

    .certificate-info {
        padding: 0.75rem;
    }

    .certificate-info h4 {
        font-size: 0.95rem;
    }

    .certificate-info p {
        font-size: 0.8rem;
    }

    /* Modal mobile */
    .certificate-modal-content {
        margin: 0.5rem;
        max-height: 98vh;
    }

    .certificate-modal-header {
        padding: 0.75rem;
    }

    .certificate-modal-body {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {

    /* Extra small screens */
    .hero-h1 {
        font-size: 1.75rem;
    }

    .contact-card {
        padding: 0.75rem;
    }

    .contact-form-card {
        padding: 0.75rem;
    }

    .social-link {
        flex: 1 1 100%;
        margin-bottom: 0.25rem;
    }

    .certificate-modal-content {
        margin: 0;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .certificate-modal-header {
        padding: 0.5rem;
    }

    .certificate-modal-body {
        padding: 0.5rem;
    }
}

/* Prevent horizontal scroll globally */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Fix for select dropdown on mobile */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select.form-control::-ms-expand {
    display: none;
}

/* Toast Responsive Styles */
@media (max-width: 576px) {
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .toast {
        min-width: auto;
        max-width: 100%;
        margin-bottom: 0.25rem;
    }

    .toast-body {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .btn-close-success,
    .btn-close-error,
    .btn-close-info {
        padding: 0.2rem 0.4rem;
    }
}


/* Toast Responsive Styles */
@media (max-width: 576px) {
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .toast {
        min-width: auto;
        max-width: 100%;
        margin-bottom: 0.25rem;
    }

    .toast-body {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .btn-close-success,
    .btn-close-error,
    .btn-close-info {
        padding: 0.2rem 0.4rem;
    }
}

/* Toast notification styles */
    .toast-container {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 9999;
    }

    .toast-notification {
      min-width: 300px;
      max-width: 400px;
      margin-bottom: 10px;
      padding: 16px 20px;
      border-radius: 12px;
      background: white;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
      display: flex;
      align-items: center;
      justify-content: space-between;
      transform: translateX(120%);
      transition: transform 0.3s ease-in-out;
      border-left: 4px solid;
      animation: slideIn 0.3s ease-in-out forwards;
    }

    @keyframes slideIn {
      to {
        transform: translateX(0);
      }
    }

    .toast-notification.success {
      border-left-color: #10b981;
      background: linear-gradient(to right, #f0fdf4, white);
    }

    .toast-notification.error {
      border-left-color: #ef4444;
      background: linear-gradient(to right, #fef2f2, white);
    }

    .toast-notification.info {
      border-left-color: #3b82f6;
      background: linear-gradient(to right, #eff6ff, white);
    }

    .toast-content {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .toast-icon {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .toast-icon.success {
      color: #10b981;
    }

    .toast-icon.error {
      color: #ef4444;
    }

    .toast-icon.info {
      color: #3b82f6;
    }

    .toast-message {
      font-size: 14px;
      color: #1f2937;
      line-height: 1.5;
      flex: 1;
    }

    .toast-message strong {
      color: #8b5cf6;
      font-weight: 600;
    }

    .toast-close {
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      color: #9ca3af;
      transition: color 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .toast-close:hover {
      color: #4b5563;
    }

    .toast-close svg {
      width: 16px;
      height: 16px;
    }

    .toast-notification.fade-out {
      animation: fadeOut 0.3s ease-in-out forwards;
    }

    @keyframes fadeOut {
      to {
        transform: translateX(120%);
        opacity: 0;
      }
    }