/**
 * Single Partner Page Styles
 *
 * Styles for the single partner custom post type template.
 */

/* =================================
   Reset & Basic Styles
================================= */
:root {
    --main-red: #E53935;
    --secondary-blue: #012847;
    --color-text-dark: #1f2937;
    --color-text-light: #6b7280;
    --color-secondary: #012847;
    --color-border: #d1d5db;
    --gray-50: #F9FAFB;
    --gray-200: #E5E7EB;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #11182C;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.dp-container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.dp-main-header {
    background-color: var(--white);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.dp-main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.dp-nav-links {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.dp-nav-links a:hover {
    color: var(--main-red);
}

.dp-nav-button {
    padding: 0.5rem 1rem;
    color: var(--white);
    background-color: var(--main-red);
    border-radius: 0.375rem;
}

.dp-nav-button:hover {
    opacity: 0.9;
}

.dp-mobile-menu-button {
    display: block;
}

.dp-main-content {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.dp-content-grid {
    padding-top: 24px;
    padding-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dp-sidebar {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    order: 2;
}

.dp-primary-content {
    order: 1;
}

/* =================================
   Hero Section
================================= */
.dp-hero-section-content {
    display: flex;
    flex-direction: column;
}

.dp-hero-info h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.dp-hero-meta {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-light);
}

.dp-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dp-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 9999px;
}

.dp-tag svg {
    width: 1rem;
    height: 1rem;
}

.dp-hero-description {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.625;
    max-width: 65ch;
}

.dp-hero-cta-desktop {
    display: none;
    flex-direction: row;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: 2rem;
}

/* =================================
   Reusable Card Component
================================= */
.dp-card {
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 2vh;
}

.dp-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--gray-800);
}

.dp-card.dp-flex {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.dp-card-cta-title {
    padding-top: 5px;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 600;
    color: #192a3d;
    text-align: start;
    margin-bottom: 8px;
}

.dp-card-cta-subtitle {
    font-size: 0.85rem;
    color: #4a5568;
    text-align: start;
    margin-bottom: 24px;
}

.dp-info-title {
    font-size: 18px;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--gray-800);
}

.dp-info-section {
    margin-top: 2vh;
}

.dp-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0;
}

.dp-info-item svg {
    color: var(--main-red);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.dp-info-item-content p:first-child {
    font-weight: 600;
    margin-bottom: 0;
    color: var(--secondary-blue);
}

.dp-info-item-content p:last-child {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--gray-500);
    margin-bottom: 0;
}

.dp-tags-container {
    margin-top: 1vh;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dp-tag {
    display: inline-block;
    font-size: 14px;
    line-height: 1.25rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.dp-tag-specialty {
    background-color: rgba(229, 57, 53, 0.1);
    color: var(--main-red);
}

.dp-tag-region {
    background-color: rgba(1, 40, 71, 0.1);
    color: var(--secondary-blue);
}

/* =================================
   Partner Header
================================= */
.dp-partner-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    gap: 1rem;
}

.dp-partner-title {
    min-width: 0;
}

.dp-partner-title h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.dp-partner-title p {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.dp-partner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 16px;
    font-weight: 600;
}

/* =================================
   Buttons
================================= */
.dp-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.1s ease,
                color 0.25s ease;
    font-size: 16px;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.dp-btn-secondary {
    background-color: transparent;
    color: var(--main-red);
    box-shadow: none;
    border: 1px solid var(--main-red);
}

.dp-btn-secondary:hover {
    background-color: var(--main-red);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.dp-btn-secondary:active {
    background-color: #90001b;
    color: #ffe4e6;
    border-color: #90001b;
    transform: scale(0.97);
}

.dp-btn-primary {
    background-color: var(--main-red);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.dp-btn-primary:hover {
    background-color: #c00024;
    color: #fef2f2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dp-btn-primary:active {
    background-color: #90001b;
    color: #ffe4e6;
    transform: scale(0.97);
}

.dp-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

/* =================================
   About & Portfolio Sections
================================= */
.dp-about-section,
.dp-portfolio-section {
    margin-top: 2vh;
}

.dp-about-section p {
    margin-top: 2vh;
    margin-bottom: 0;
    line-height: 1.625;
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 400;
    text-align: justify;
}

.dp-portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-portfolio-tabs {
    display: flex;
    gap: 1.5rem;
    color: var(--gray-500);
}

.dp-portfolio-tab {
    padding-bottom: 0.25rem;
    transition: all 0.2s ease-in-out;
}

.dp-portfolio-tab.dp-active {
    border-bottom: 2px solid var(--main-red);
    color: var(--main-red);
    font-weight: 600;
}

.pdp-hidden {
    display: none;
}

/* =================================
   Portfolio Tabs
================================= */
.pdp-tabs-container {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.pdp-tab-btn {
    background-color: transparent;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.pdp-tab-btn.active {
    background-color: var(--main-red);
    color: white;
    font-weight: 600;
}

/* =================================
   Portfolio Grid
================================= */
.pdp-portfolio-container * {
    box-sizing: border-box;
}

.pdp-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pdp-portfolio-item .pdp-image-container {
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 4 / 3;
    background-color: #f0f0f0;
}

.pdp-portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.pdp-portfolio-item:hover img {
    transform: scale(1.05);
}

.pdp-portfolio-item h4 {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdp-portfolio-item a {
    text-decoration: none;
    color: inherit;
}

/* =================================
   Portfolio Rating
================================= */
.pdp-rating-container {
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
}

.pdp-stars {
    display: flex;
    margin-right: 0.5rem;
    color: #facc15;
}

.pdp-star-icon {
    width: 14px;
    height: 14px;
}

.pdp-rating-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* =================================
   PDF Viewer
================================= */
.pdp-pdf-viewer-container {
    margin-top: 1.5rem;
}

.pdp-pdf-viewer {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.41;
    max-height: 80vh;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}

.pdp-portfolio-message {
    background-color: #fafafa;
    color: #4b5563;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

/* =================================
   Mobile Toggle Button
================================= */
.dp-about-section .toggle-btn {
    display: none;
    margin-top: 0.5rem;
    color: var(--main-red);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

/* =================================
   Responsive Styles
================================= */
@media (max-width: 480px) {
    .dp-partner-title h1 {
        font-size: 20px;
    }

    .dp-card-title {
        font-size: 18px;
    }

    .dp-info-title {
        font-size: 16px;
    }

    .dp-partner-actions {
        flex-direction: column;
        align-items: center;
    }

    .dp-partner-actions .dp-btn {
        width: 100%;
        text-align: center;
    }

    .dp-about-section p {
        max-height: 4.8em;
        overflow: hidden;
        position: relative;
        font-size: 16px;
    }

    .dp-about-section.expanded p {
        max-height: none;
    }

    .dp-about-section .toggle-btn {
        display: inline-block;
    }

    .pdp-tab-btn {
        padding: 0.25rem 0.5rem;
    }

    .dp-content-grid {
        gap: 0.25rem;
    }

    .dp-btn {
        font-size: 14px;
    }

    .pdp-portfolio-item h4 {
        margin-top: 4px;
        font-weight: 500;
        font-size: 14px;
        color: var(--color-text-dark);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (min-width: 640px) {
    .dp-partner-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .dp-partner-title {
        flex-grow: 1;
    }

    .dp-partner-actions {
        flex-shrink: 0;
        padding: 0 5%;
    }
}

@media (min-width: 768px) {
    .dp-nav-links {
        display: flex;
    }

    .dp-mobile-menu-button {
        display: none;
    }

    .dp-content-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dp-sidebar {
        grid-column: span 1 / span 1;
        order: 1;
    }

    .dp-primary-content {
        grid-column: span 3 / span 3;
        order: 2;
    }

    .dp-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .dp-gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
