/* ============================================================
   GLOBAL BORDER RADIUS LAYER & MODERN UI OVERRIDES
   ============================================================ */

/* 1. NATIVE FORM INPUTS & TEXTAREAS */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  border-radius: var(--radius-input, 16px);
}

/* Contact Form 7 Forms & Inputs */
.wpcf7-form-control:not(.wpcf7-submit) {
  border-radius: var(--radius-input, 16px) !important;
}

.wpcf7-submit {
  border-radius: var(--radius-btn, 9999px) !important;
}

/* Comment Form & Search Form */
.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
  border-radius: var(--radius-input, 16px) !important;
}

.search-form button,
.search-form input[type="submit"] {
  border-radius: var(--radius-btn, 9999px) !important;
}

/* 2. TABLES */
table,
.wp-block-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid var(--color-border, #E5E7EB);
}

table th:first-child {
  border-top-left-radius: var(--radius-lg, 16px);
}

table th:last-child {
  border-top-right-radius: var(--radius-lg, 16px);
}

table tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg, 16px);
}

table tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg, 16px);
}

/* 3. WORDPRESS CORE BLOCKS & IMAGES */
.wp-block-image,
.wp-block-image img,
.wp-block-gallery,
.wp-block-gallery .wp-block-image img,
.wp-block-cover,
.wp-block-cover__image-background,
.wp-block-cover-image {
  border-radius: var(--radius-xl, 24px) !important;
  overflow: hidden;
}

/* Quote Blocks */
.wp-block-quote,
.wp-block-pullquote {
  border-radius: var(--radius-lg, 16px) !important;
  overflow: hidden;
}

/* Gutenberg Buttons */
.wp-block-button__link {
  border-radius: var(--radius-btn, 9999px) !important;
  transition: all var(--transition-base, 0.25s ease) !important;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 4. WORDPRESS WIDGETS & SIDEBAR */
.widget,
.widget-area .widget,
.widget_search,
.widget_categories,
.widget_archive,
.widget_recent_entries,
.widget_recent_comments {
  border-radius: var(--radius-widget, 24px) !important;
  overflow: hidden;
}

/* WordPress Admin Bar item refinements */
#wpadminbar {
  --wp-admin--admin-bar--menu-radius: var(--radius-md, 12px);
}

/* 5. IMAGE WRAPPERS & OVERFLOW PROTECTION */
.rounded-overflow,
.post-thumbnail,
.featured-media,
.wp-block-image figure,
.wp-block-image,
.wp-block-gallery .wp-block-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 24px);
  box-shadow: var(--shadow-md);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.rounded-overflow:hover,
.post-thumbnail:hover,
.featured-media:hover,
.wp-block-image:hover,
.wp-block-gallery .wp-block-image:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}

/* Ensure child images strictly respect border radius */
.rounded-overflow img,
.post-thumbnail img,
.featured-media img,
.wp-block-image figure img,
.wp-block-image img,
.wp-block-gallery .wp-block-image img {
  border-radius: inherit;
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
  transition: transform 0.4s ease;
}

.rounded-overflow:hover img,
.post-thumbnail:hover img,
.featured-media:hover img,
.wp-block-image:hover img,
.wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.04);
}

/* 6. MODALS & POPUPS (Generic/Common WordPress namespaces) */
.modal-content,
.popup-content,
.fancybox-content,
.lity-content,
.sweet-alert,
.modal-dialog {
  border-radius: var(--radius-2xl, 32px) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.16)) !important;
}

/* 7. PREMIUM TRANSITIONS & HOVER MICRO-ANIMATIONS */
a, button, .btn, .card, .icon-box, .service-card, .testimonial-card, .benefit-card, .process-step, .faq-item, .blog-card, .portfolio-card {
  transition: 
    color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 8. GLOBAL IMAGE STANDARDIZATION & QUALITY ENFORCEMENT */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Enforce aspect ratio consistency on various containers */
.entry-content img {
  width: 100% !important;
  aspect-ratio: 16/10;
  object-fit: cover !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md) !important;
  transition: transform var(--transition-slow), box-shadow var(--transition-base);
}

.entry-content img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
}

/* 9. HOME HERO FLOATING BADGES REFINEMENT */
.hero-float-card {
  border-radius: var(--radius-xl, 24px) !important; /* smooth and rounded corners */
  border: 1px solid rgba(28, 28, 46, 0.08) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

.hero-float-card--1 {
  left: -2% !important; /* pull in slightly to prevent clipping on standard desktop viewports */
}

.hero-float-card--2 {
  right: -2% !important; /* pull in slightly to prevent clipping on standard desktop viewports */
}

@media (max-width: 1280px) {
  .hero-float-card--1 {
    left: 0% !important;
  }
  .hero-float-card--2 {
    right: 0% !important;
  }
}

@media (max-width: 991px) {
  .hero-float-card--1 {
    left: 2% !important;
    bottom: 5% !important;
  }
  .hero-float-card--2 {
    right: 2% !important;
    top: 10% !important;
  }
}

@media (max-width: 576px) {
  .hero-float-card {
    padding: 8px 14px !important;
    gap: 8px !important;
    border-radius: 16px !important; /* proportional rounding for small sizes */
  }
  .hero-float-card--1 {
    left: 10px !important;
    bottom: 15px !important;
  }
  .hero-float-card--2 {
    right: 10px !important;
    top: 15px !important;
  }
  .float-card-icon {
    width: 30px !important;
    height: 30px !important;
  }
  .float-card-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
  .float-card-content strong {
    font-size: 11px !important;
  }
  .float-card-content span {
    font-size: 9px !important;
  }
}
